Codelet restriction
This page describes the organizational forces that limit change.  It explains how to overcome them when necessary. 

Power& tradition holding back progress
This page uses an example to illustrate how:
  • A business can gain focus from targeting key customers,
  • Business planning activities performed by the whole organization can build awareness, empowerment and coherence. 
  • A program approach can ensure strategic alignment. 
Be responsive to market dynamics
This page uses the example of HP's printer organization freeing itself from its organizational constraints to sell a printer targeted at the IBM pc user. 
The constraints are described. 
The techniques to overcome them are implied. 
Overcome reactionaries
Primary Navigation

Restriction of codelets by inhibition

Summary
This page describes the inhibitor, in an enzyme catalyzed reaction an inhibitor can stop the reaction.  It may be competitive, uncompetitive or noncompetitive.  Competitive inhibitors compete with the substrate for access to the active site.  Uncompetitive inhibitors react only with the enzyme-substrate complex creating an inhibited complex.  Noncompetitive inhibitors combine with the enzyme away from the active site and change the shape of the enzyme and its active site.  The adaptive web framework's (AWF) Smiley inhibitors are uncompetitive.  But the inhibition can be removed (reversed) by deploying descriptors. 
framework provided by the adaptive web framework's (AWF)
This page describes the Adaptive Web framework (AWF) test system and the agent programming framework (Smiley) that supports its operation. 
Example test system statements are included.  To begin a test a test statement is loaded into Smiley while Smiley executes on the Perl interpreter. 
Part of Smiley's Perl code focused on setting up the infrastructure is included bellow. 
The setup includes:
  • Loading the 'Meta file' specification,
  • Initializing the Slipnet, and Workspaces and loading them
  • So that the Coderack can be called. 
The Coderack, which is the focus of a separate page of the Perl frame then schedules and runs the codelets that are invoked by the test statement structures. 
Smiley
agent programming infrastructure. 
Two mechanisms are provided:
  1. Uncompetitive inhibition of group completion
  2. Uncompetitive inhibition of transcription factors.  
In both cases the inhibitors provide a
This page discusses the benefits of constraining the flows in a complex adaptive system (CAS) until you are ready to act. 
restriction process

The
This page describes the Copycat Slipnet. 
The goal of the Slipnet is reviewed. 
Smiley's specialized use of the Slipnet is introduced. 
The initial Slipnet network used by the 'Merge Streams' and 'Virtual Robot' agent-based applications is setup in initchemistry and is included. 
The Slipnet infrastructure and initialization functions are included. 
Slipnet
inhibitor descriptions are included
The codelets and supporting infrastructure are included
Introduction
When an adaptive web framework test infrastructure (Smiley) Workspace string
This page describes the adaptive web framework (AWF) Smiley agent progamming infrastructure's codelet based Copycat grouping operation. 
The requirements needed for a group to complete are described. 
The association of group completion with a Slipnet defined operon is described.  Either actions or signals result from the association. 
How a generated signal is transported to the nucleus of the cell and matched with an operon is described. 
A match with an operon can result in deployment of a schematic string to the original Workspace.  But eventually the deployed string will be destroyed. 
Smiley infrastructure amplification of the group completion operation is introduced.  This includes facilities to inhibit crowding out of offspring. 
A test file awfart04 is included. 
The group codelet and supporting functions are included. 
group completes
a process starts which typically results in the generation of a codelet
This page describes the Smiley infrastructure that supports the associative binding of schematic strings to codelets defined in the Meta file and Slipnet. 
The infrastructure supporting the associations is introduced. 
The role of Jeff Hawkins neocortical attributes is discussed. 
Relevant Slipnet configurations are included. 
The codelets and supporting functions are included. 
associated
with the original string.  However, to allow
This page discusses the benefits of constraining the flows in a complex adaptive system (CAS) until you are ready to act. 
restrictions
of the activity until more appropriate conditions prevail an inhibitor, in an enzyme catalyzed reaction an inhibitor can stop the reaction.  It may be competitive, uncompetitive or noncompetitive.  Competitive inhibitors compete with the substrate for access to the active site.  Uncompetitive inhibitors react only with the enzyme-substrate complex creating an inhibited complex.  Noncompetitive inhibitors combine with the enzyme away from the active site and change the shape of the enzyme and its active site.  The adaptive web framework's (AWF) Smiley inhibitors are uncompetitive.  But the inhibition can be removed (reversed) by deploying descriptors. 
can be specified in the
This page describes the Copycat Slipnet. 
The goal of the Slipnet is reviewed. 
Smiley's specialized use of the Slipnet is introduced. 
The initial Slipnet network used by the 'Merge Streams' and 'Virtual Robot' agent-based applications is setup in initchemistry and is included. 
The Slipnet infrastructure and initialization functions are included. 
Slipnet
and enacted with a group completion or transcription factor are enzymes which associate with a transcription complex to bind to the DNA and control its transcription and hence translation into proteins.  The regulation of DNA transcription and protein synthesis are reviewed by Tsonis.  In AWF the transcription, translation and deployment infrastructure of the eukaryotic cell has been abstracted in a codelet based implementation. 
inhibitor codelet.  If an inhibitor has been configured (for example lb, dev) in the
This page describes the Copycat Slipnet. 
The goal of the Slipnet is reviewed. 
Smiley's specialized use of the Slipnet is introduced. 
The initial Slipnet network used by the 'Merge Streams' and 'Virtual Robot' agent-based applications is setup in initchemistry and is included. 
The Slipnet infrastructure and initialization functions are included. 
Slipnet
, then rather than the directly associated codelet (lbevaluator or devevaluator) an inhibitor codelet (lbinhibitor, devinhibitor) will be initiated instead.  Equivalently if a transcription factor is required for a schematic operon is an addressable control structure which is used in biological cells to control access to other regions of the DNA. 
to enable deployment of a subgroup a signalling inhibitor can enable restriction. 
Codelet Inhibitor framework
The groupbuilder (1, 2) initiates the associative creation of a codelet as a part of group completion.  The groupbuilder will have obtained the $Awfif::jhls control structure array slice [10] as part of its associative matching process.  It defines the head of the group completed schemata's inhibitor list.  The groupbuilder uses icdsubmitcodelet to 'create' the schematically associated codelet.  icdsubmitcodelet specifically checks the list of Slipnet associated inhibitors ,places matching inhibitor reference in $Awfif::codelet-> {l} [24] and runs the inhibitor, allowing for an immediate assessment by each inhibitor of whether to allow the codelet to run.  If an inhibitor decides to inhibit the codelet icdsubmitcodelet will ignore the submit request.  An active inhibitor will also have scheduled itself to run on the
This page describes the Copycat Coderack. 
The details of the codelet architecture are described. 
The specialized use of the Coderack by the adaptive web framework's (AWF) Smiley is discussed. 
The codelet scheduling mechanism is discussed. 
A variety of Smiley extensions to the Coderack are reviewed. 
The Coderack infrastructure functions are included. 
Coderack
in the future. 
The group completion restriction process
The inhibitor is designed to
The agents in complex adaptive systems (CAS) must model their environment to respond effectively to it.  Samuel modeling is described as an approach. 
model
its immediate
The complex adaptive system (CAS) nature of a value delivery system is first introduced.  It's a network of agents acting as relays. 

The critical nature of hub agents and the difficulty of altering an aligned network is reviewed. 

The nature of and exceptional opportunities created by platforms are discussed. 

Finally an example of aligning a VDS is presented. 
environment
looking in any valid in-scope statement Workspace object (WSO) for descriptors that indicate it should allow its associated evaluator to run.  While these descriptors are not present the inhibitor will schedule itself to run in place of the evaluator. 

The inhibitor scheduling strategy is either to:
  • Check at intervals if its environment has changed. - The active list codelet ($Awfif::memes-> {codeleth} is its head) becomes immortal once it becomes an entry of $Awfif::inhibl-> {l} [item] [3] with freecodelet slowly raising its priority until it runs on the Coderack, when it removes its imortality, and either resubmits a new inhibitor instance (cdsubmitcodelet) including making the new codelet immortal or stops the inhibition including deleting the stored clp settings; or
  • Wait for the appropriate descriptor to be deployed by issuing a call to waitondesclbinhibitor, for example, will wait for the statementbuilder to deploy a statement valid descriptor

Nuclear signalling inhibition

When a codelet issues a
Agents use sensors to detect events in their environment.  This page reviews how these events become signals associated with beneficial responses in a complex adaptive system (CAS).  CAS signals emerge from the Darwinian information model.  Signals can indicate decision summaries and level of uncertainty. 
signal
(with ilaunchnc) a process starts which typically results in the deployment of a schematic operon is an addressable control structure which is used in biological cells to control access to other regions of the DNA. 
to the codelet's Workspace.  However, the process can be inhibited.  Transcription factors, such as e2ftf (evaluator, builder) may be required to associate with the nuclear binding complex for the signal to be resolved.  In Smiley this will occur because of an association in the
This page describes the Copycat Slipnet. 
The goal of the Slipnet is reviewed. 
Smiley's specialized use of the Slipnet is introduced. 
The initial Slipnet network used by the 'Merge Streams' and 'Virtual Robot' agent-based applications is setup in initchemistry and is included. 
The Slipnet infrastructure and initialization functions are included. 
Slipnet
between the transcription factor and the schematic string which needs its support (for example ecycdop) allowing the
This page describes the specialized codelets that provide life-cycle and checkpoint capabilities for Smiley applications. 
The codelets implement a Shewhart cycle. 
The structural schematic nature of the cycle is described. 
Transcription factor codelets operate the phase change controls. 
How inhibitory agents are integrated into the cycle is described. 
An application agent with management and operational roles emerges. 
The codelets and supporting functions are included. 
pdca
codelets to facilitate the inhibition. 
The signalling restriction process
The inhibition constrains the nuclear
This page discusses how Smiley provides signalling to its agent-based applications. 
Alternative strategies for initiating the signalling are reviewed. 
The codelets and supporting functions are included.
signal
Flows of different kinds are essential to the operation of complex adaptive systems (CAS). 
Example flows are outlined.  Constraints on flows support the emergence of the systems.  Examples of constraints are discussed. 
flows
with the cooperation of nuclabmbuilder and spcclone

The inhibition is associated with the transcription factor via addjhltrf. 

#
    my ($pconc, $jhlsid);
# msecycbindtotf

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {mergestreams}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {mergestreams}] [1], 8, $Awfif::memes-> {currentwsbi});
    &Awfif::addjhltrf ($pconc, $Awfif::memes-> {snnh} {mergestreams}, $Awfif::memes-> {snnh} {for}, $Awfif::memes-> {snnh} {program}, $Awfif::memes-> {snnh} {do}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {factor}, $Awfif::memes-> {snnh} {e2ftfevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# msbcycbindtotf

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {mergestreams}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {mergestreams}] [1], 8, $Awfif::memes-> {currentwsbi});
    &Awfif::addjhltrf ($pconc, $Awfif::memes-> {snnh} {mergestreams}, $Awfif::memes-> {snnh} {for}, $Awfif::memes-> {snnh} {program}, $Awfif::memes-> {snnh} {act}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {factor}, $Awfif::memes-> {snnh} {e2ftfevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# mscassertbindtotf

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {mergestreams}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {mergestreams}] [1], 8, $Awfif::memes-> {currentwsbi});
    &Awfif::addjhltrf ($pconc, $Awfif::memes-> {snnh} {mergestreams}, $Awfif::memes-> {snnh} {for}, $Awfif::memes-> {snnh} {case}, $Awfif::memes-> {snnh} {resolved}, $Awfif::memes-> {snnh} {assert}, $Awfif::memes-> {snnh} {true}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {factor}, $Awfif::memes-> {snnh} {e2ftfevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# dlibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {lists}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
#<!-- start tag vbt -->
# dvbtlibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, ($jhlsid = Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc)), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {square}, $Awfif::memes-> {snnh} {cans}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlstm ($jhlsid, 'devbtwldbuilder');
# dvbtwlibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, ($jhlsid = Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc)), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {deploy}, $Awfif::memes-> {snnh} {square}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlstm ($jhlsid, 'devbtcnsbuilder');
#<!-- end tag vbt -->
#<!-- start tag scl -->
# dscllibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, ($jhlsid = Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc)), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {square}, $Awfif::memes-> {snnh} {cans}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlstm ($jhlsid, 'devscwldbuilder');
# dsclwlibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, ($jhlsid = Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc)), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {deploy}, $Awfif::memes-> {snnh} {two}, $Awfif::memes-> {snnh} {square}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlstm ($jhlsid, 'devsccnsbuilder');
# dsclscibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, ($jhlsid = Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc)), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {deploy}, $Awfif::memes-> {snnh} {two}, $Awfif::memes-> {snnh} {cans}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlstm ($jhlsid, 'devpcellbuilder');
# dsclpcibindtomsiggv

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, ($jhlsid = Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc)), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {deploy}, $Awfif::memes-> {snnh} {two}, $Awfif::memes-> {snnh} {pcell}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlstm ($jhlsid, 'devscellbuilder');
#<!-- end tag scl -->
# dlicasbindtosig

# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {initial}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# hdoslocbindtosig

# setup the binding string for the multi path signal to control development processing - histone codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {hdo}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {hdo}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {hdo}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {initial}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# dlicasslbindtosig
# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {startlistkw}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# dlicassl2bindtosig
# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {startrcdkw}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# dlicassl3bindtosig
# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {endrcdkw}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# dlicassl4bindtosig
# setup the binding string for the multi path signal to control development processing - development codelets launch nuclabmcodelets which ignore the concept as long as it had an evaluator

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
# next want to setup the operon
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {mpsignal}, $pconc, 2, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {schema}, $Awfif::memes-> {snnh} {endlistkw}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {nuclabmevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# devbindtosig
# setup the binding string for the single path signal to initiate a devevaluator/builder

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {spsignal}, $pconc, 1, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc, undef(), undef(), undef(), 't'), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {develop}, $Awfif::memes-> {snnh} {lists}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {devevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# devibindtosig

    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {inspector}, $Awfif::memes-> {snnh} {devinspector}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# devbindtoinhib

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
    &Awfif::addjhlinhib ($pconc, $Awfif::memes-> {snnh} {develop}, $Awfif::memes-> {snnh} {lists}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {inhibitor}, $Awfif::memes-> {snnh} {devinhibitor}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
# devbindtobis
# setup the binding string for the binder

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {spsignal}, $pconc, 1, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc, undef(), undef(), undef(), 't'), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {sequence}, $Awfif::memes-> {snnh} {integration}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$Awfif::memes-> {snnh} {development}] = Awfif::newnlink ( $Awfif::memes-> {snnh} {cinstance},$Awfif::memes-> {snnh} {namescategory},$Awfif::memes-> {snnh} {development},
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::memes-> {snnh} {development}]);
# vbtdevbindtoinhib

    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {development}] [1], 8, $Awfif::memes-> {currentwsbi});
    &Awfif::addjhlinhib ($pconc, $Awfif::memes-> {snnh} {develop}, $Awfif::memes-> {snnh} {square}, $Awfif::memes-> {snnh} {cans}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {inhibitor}, $Awfif::memes-> {snnh} {vbtdevinhibitor}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
#<!-- start tag sma -->
# lbbindtosig
# setup the binding string for the single path signal to initiate a loadbuffer
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {loadbuffer}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {loadbuffer}] [1], 8, $Awfif::memes-> {currentwsbi});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {attrib}, Awfif::addjhlst ($Awfif::memes-> {snnh} {spsignal}, $pconc, 1, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc], $pconc), $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    &Awfif::addjhlattribs ($pconc, $Awfif::memes-> {snnh} {file}, $Awfif::memes-> {snnh} {name}, $Awfif::memes-> {snnh} {equals}, $Awfif::memes-> {snnh} {char}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {evaluator}, $Awfif::memes-> {snnh} {lbevaluator}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
#<!-- end tag sma -->
# lbbindtoinhib
    $Awfif::memes-> {maxoper}++; $jhlsid = 0;
    $pconc = Awfif::pconc ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {loadbuffer}] [0], $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnc} [$Awfif::memes-> {snnh} {loadbuffer}] [1], 8, $Awfif::memes-> {currentwsbi});
    &Awfif::addjhlinhib ($pconc, $Awfif::memes-> {snnh} {file}, $Awfif::memes-> {snnh} {name}, $Awfif::memes-> {snnh} {equals}, $Awfif::memes-> {snnh} {char}, $Awfif::memes-> {snnh} {attribr});
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$pconc] = Awfif::newnlink ($Awfif::memes-> {snnh} {inhibitor}, $Awfif::memes-> {snnh} {lbinhibitor}, $pconc,
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$pconc]);
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$Awfif::memes-> {snnh} {loadbuffer}] = Awfif::newnlink ( $Awfif::memes-> {snnh} {cinstance},$Awfif::memes-> {snnh} {file},$Awfif::memes-> {snnh} {loadbuffer},
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::memes-> {snnh} {loadbuffer}]);
    $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}
      [$Awfif::memes-> {snnh} {loadbuffer}] = Awfif::newnlink ( $Awfif::memes-> {snnh} {cinstance},$Awfif::memes-> {snnh} {dname},$Awfif::memes-> {snnh} {loadbuffer},
                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::memes-> {snnh} {loadbuffer}]);

Functions

#
sub ctficomp {# check if transcription factor inhibition is complete
    my($myli, $jhlsi, $kwp, $kwpr, $sactset, $ctfifound)=@_;
    my ($continue, $factor, $e2ftwso, $pws);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ctficomp ");
      };

    $continue = ictficomp ($myli, $jhlsi, $kwp, $kwpr, \@$sactset, \$$ctfifound, \$factor, \$e2ftwso, \$pws);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ctficompx ctfifound($$ctfifound) ret ($continue)\n");
      };

    return ($continue)
    }# ctficomp
#
#
sub freescheckcantd {
    my($codelet, $mode)=@_;
    my ($cantd, $cwsbi, $ws, $i);
# check the local squares for a match with the desired situation, relative to current position

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("freescheckcantd codelet($codelet) ");
      };#if
    $cwsbi = $Awfif::memes-> {currentwsbi};# to later restore current state

# handle codelets that can't be deleted due to activation or inhibition
    $cantd = '';

    if ($Awfif::codelet->{l} [$codelet] [34] != 0) {#catalysed so can't be deleted

      $cantd = 't';
      };#if
# activation
# activstdel
    if (($Awfif::codelet-> {l} [$codelet] [19] != 0)) {

      $ws = $Awfif::codelet-> {l} [$codelet][19];
      }
    else {#default to current ws

      $ws = $Awfif::memes-> {currentwsbi};
      };
# freebldup1
    if (($mode != 1) #this has not been run
    && (!$cantd)
    && ($Awfif::codelet-> {l} [$codelet][2] =~ /builder/) #if got to be builder ensure runs
    ){

      $cantd = 't';
      }
# freecjhlsiup1
    elsif (($mode != 1) #this has not been run
    && (!$cantd)
    && (($Awfif::codelet-> {l} [$codelet][23] != 0)
    && ($Awfif::memes-> {snw} [$ws]-> {snna} {$Awfif::memes-> {snnih} {$Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$codelet] [23]] [6]}} > $Awfif::memes-> {killth}))
    ){

      $cantd = 't';
      }
# freecjhlsoiup1
    elsif (($mode != 1)
    && (!$cantd)
    && ($Awfif::codelet-> {l} [$codelet][30] != 0)
    && ($Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$codelet][30]] [14] [2] <= 1)
    ){

      $cantd = 't';
      }
# freectfreeup1
    elsif (($mode != 1)
    && (!$cantd)
    && ($Awfif::codelet-> {l} [$codelet][32] != 0)
    ){#cascade sponsor can't be freed

      $cantd = 't';
      }
# freectrunpu1
    elsif (($Awfif::memes-> {cruna}[0] > 0)
    && (!$cantd)
    && (matchaelement (\@{$Awfif::memes-> {cruna}}, $codelet) != 0 )
    ){#running codelet can't be freed

      $cantd = 't';
      }
    elsif (($mode != 1)
    && (!$cantd)
    && (($Awfif::codelet-> {l} [$codelet][2] eq 'tgoalscout')
    or ($Awfif::codelet-> {l} [$codelet][2] eq 'goalevaluator'))
    ){#groupcomplete signals should work

      $cantd = 't';
      };
# freecinhcdu1
# inhibition
    for ($i = 1; (($i < $Awfif::inhibl-> {p}) && (!$cantd)); $i++) {
      if ($Awfif::inhibl-> {l} [$i][3] == $codelet) {

        $cantd = 't';
        $Awfif::codelet-> {l} [$codelet] [3] *= ($Awfif::memes-> {inhuramp} * $Awfif::wsbl->{p});
        };#if
      };#for

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("freescheckcantdx ");
      print ("ret $cantd\n");
      };
    $Awfif::memes-> {currentwsbi} = $cwsbi;
    return $cantd
    }# freescheckcantd
#
#
sub poolctail {
    my ($myli, $spsubpid, $psponsori) = @_;
#
# checked for merged workspaces

# return the tail item for the sponsor's list
    my ($i, $ctail, $tail, $linki, $mylii, $found);
# from the myli find the matching sponsor in the poolcl list
    $ctail = 0;
    if ($spsubpid > 0) {

      for ($i = 0; ((!$found) && ($i < $Awfif::memes-> {totup})); $i++) {

        $linki = $Awfif::subpl-> {q} [3] [$i] [$spsubpid];
        while (($linki != 0) && (!$found)) {
          if ($Awfif::poolcl-> {l} [$linki] [2] == $myli) {

            $mylii = $linki;
            $$psponsori = $i;
            $found = 't';
            };#if
          $linki = $Awfif::poolcl-> {l} [$linki] [0];
          };#while
        };#for
      $linki = $mylii;
      $tail = $linki;
      while ($linki != 0) {
        if ($Awfif::poolcl-> {l} [$linki] [0] != 0) {

          $tail = $Awfif::poolcl-> {l} [$linki] [0];
          };#if
        $linki = $Awfif::poolcl-> {l} [$linki] [0];
        };#while
      if ($tail > 0) {

        $ctail = $Awfif::poolcl-> {l} [$tail] [2];
        };#if
      };#if
    return $ctail
    }#poolctail
#
#
sub spcclone {# clone relevent sub-program codelets returning count of cloned codelets
    my($myli, $sponsor, $asponsor, $jhlabeli, $jhlabeloi, $subprogram, $i15, $transid, $grabbed, $kwp, $kwpr, $nsubpid, $found, $usetmass)=@_;
    my ($result, $atelhwso, $transtatus, $cwsbi, $currentdefh, $stransid);

no strict 'refs';
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr);
      $pr = $Awfif::workspace-> {l}[$grabbed] [2];
      print ("spcclone myli $myli sponsor($sponsor) asponsor($asponsor) jhlabeli($jhlabeli) jhlabeloi($jhlabeloi) subprogram($subprogram) i15($i15) transid($transid) grabbed($grabbed ->($pr)) nsubpid($nsubpid) usetmass($usetmass) ");
      };#if

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $result = 0;
    $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$myli] [20];
    $atelhwso = awsoadr (trwsoadr ($sponsor, -1));

    my ($procname, $i3, $codelet, $atelhdr, $foundgd, $linki, $clasponsor, $ci);
# spigraclone3

    for ($i3 = 1; (($i3 <= $Awfif::jhls-> {l} [$jhlabeli][18][0])); $i3++){#each builder string in {18}
      &tracesga ($myli, $grabbed, $jhlabeli, undef(), $i15, $i3);
      if (($Awfif::codelet-> {l} [$Awfif::subpl-> {l} [ ( $Awfif::workspace-> {l}[$grabbed] [2] ) ] [15][$i15]] [2] eq $Awfif::jhls-> {l} [$jhlabeli][18][$i3] )
      && ($Awfif::codelet-> {l} [$Awfif::subpl-> {l} [ ( $Awfif::workspace-> {l}[$grabbed] [2] ) ] [15][$i15]] [2] ne $Awfif::codelet-> {l} [$myli] [2])
      && (
        (matchicsaelement ((\@{$Awfif::subpl-> {l} [$subprogram][15]} ), $Awfif::jhls-> {l} [$jhlabeli][18][$i3]) == 0) )
      ){

        my ($match, $mfound, $im1, $im2);
        $codelet = $Awfif::subpl-> {l} [( $Awfif::workspace-> {l}[$grabbed] [2] )] [15][$i15];
        $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$codelet][20];
        $atelhdr = awsoadr (trwsoadr ($Awfif::codelet-> {l} [$codelet][21],-1));
# spigractficu1

        if ( (!defined ($Awfif::jhls-> {l} [$jhlabeli][17]))
        or ( ctficomp ($myli, $jhlabeli, $kwp, $kwpr, \@{$Awfif::memes-> {sactset}}) )
        ){#clone in the sub-program as long as allowed in this context
# it will have its own [s]transid matched to its subpid

          $$found = 't';
          $match = 1;
          $mfound = '';
# iterate until the transaction matches the builder to be sponsored
          for ($im1 = 1; ((!$mfound) && ($im1 <= $Awfif::subpl-> {l} [$subprogram] [11][ 0 ])); $im1++ ){#each item in 11

            for ($im2 = 1; ((!$mfound) && ($im2 <= $Awfif::tral-> {i} [$Awfif::subpl-> {l} [$subprogram] [11][$im1]] [0])); $im2++){#each builder string in {i}

              if ($Awfif::tral-> {i} [$Awfif::subpl-> {l} [$subprogram] [11][$im1]][$im2] eq $Awfif::jhls-> {l} [$jhlabeli][18][$i3] ){

                $mfound = 't';
                $match = $im1;
                };#if
              };#for im2
            };#for im1

          $transtatus = 0;
          if ((defined ($usetmass)) && ($usetmass) && ($usetmass eq $Awfif::tral-> {l} [($stransid = getsubptransid ($myli, $subprogram))] [3])) {#this is being called from a codelet that knows the transid of the subcascade codelets is in its schematas tmassl and is not referenced by subpl[11]

            if ($stransid == 0) {#need to generate a new one acting as both the initiator (if this is the first clone of a set) and nsdepbuilder
# initiator -

              $stransid = transalloc ($myli, $Awfif::memes-> {snnh} {transid}, $jhlabeli, undef(), \$transtatus);
              };#if
            }#if
          else {
# initiator -

            if (!$mfound) {&break()};
            $stransid = $Awfif::subpl-> {l} [$subprogram] [11][$match];#match the index to the transaction to be initiated
            };#else

          $Awfif::clp = ();
          $currentdefh = $Awfif::memes-> {codeletdef};#check that a clone really was depolyed into the deferred queue
          $procname = setupprocname ($codelet, undef());
          $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$codelet][13];
          $Awfif::clp-> {urgency} = $Awfif::codelet-> {l} [$codelet][3];
          $Awfif::clp-> {strategy} = $procname;
          $Awfif::clp-> {action}-> {sponsor} = $Awfif::codelet-> {l} [$codelet][17];
          $Awfif::clp-> {action}-> {signal} = $Awfif::codelet-> {l} [$codelet][16];
          $Awfif::clp-> {action}-> {schema} = $Awfif::codelet-> {l} [$codelet][18];
          $Awfif::clp-> {action}-> {ref} = $Awfif::codelet-> {l} [$codelet][4];
          $Awfif::clp-> {action}-> {sws} = $Awfif::codelet-> {l} [$codelet][20];
          $Awfif::clp-> {action}-> {wss} = $Awfif::codelet-> {l} [$codelet][21];
          $Awfif::clp-> {action}-> {wse} = $Awfif::codelet-> {l} [$codelet][22];
          $Awfif::clp-> {action}-> {wsoname} = $Awfif::codelet-> {l} [$codelet][25];
          $Awfif::clp-> {action}-> {jhlabeli} = $jhlabeli;
          $Awfif::clp-> {action}-> {jhlabeloi} = $jhlabeloi;
          $Awfif::clp-> {action}-> {transid} = $stransid;
          if (($Awfif::memes-> {checktransidnz})
          &&($Awfif::clp-> {action}-> {transid} == 0)
          && (!mysubtrancomp ($myli, findsubpicnm ($myli, $subprogram, $procname), $procname))
          ){

            &break ();
            };#if
          $Awfif::clp-> {action}-> {subpi} = $subprogram;
          &groupsinv1 ($codelet, undef(), undef(), undef(), undef(),undef(), $procname, $kwp, $kwpr, \@{$Awfif::memes-> {sactset}},
            't', #deferred
            undef (), #ignore0wsoname
            undef (), #usepooling
            't' #addbreak
            );
          if ($currentdefh != $Awfif::memes-> {codeletdef}) {

            $$found = 't';
            $Awfif::subpl-> {l} [$subprogram][15] [++$Awfif::subpl-> {l} [$subprogram] [15] [0]] = ($ci = mdefhcodelettolist (0));
# spigraclu161

            $Awfif::subpl-> {l} [$subprogram][16] [ $Awfif::subpl-> {l} [$subprogram] [15] [0]] = tralassoc ($myli, $Awfif::codelet-> {l} [$ci] [2], $subprogram, $usetmass);
            $result++;
# spigracu341
# also do nuclabmbuilder checks on transid pass on to the target

            if (!schabldr ($ci, $jhlabeli, $Awfif::codelet-> {l} [$codelet][31])) {#its ok to proceed

              $Awfif::codelet-> {l}[$ci] [35] = 0;
              }#if
# add the transaction manager id setup done by the nsdepbuilder
            $Awfif::codelet-> {l}[$ci] [37] = assandmaptran ($myli, $ci, $Awfif::codelet-> {l}[$ci] [37], $atelhdr, $Awfif::memes-> {snnh} {rtran}, $Awfif::codelet-> {l}[$ci] [36]);
# spigracu342

            &assprocwtran ($ci);
# add the groupstart & end transactions done by groupbuilder
# spigracgs1

            $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$codelet][20];
            $foundgd = '';
            $linki = $Awfif::wsol-> {l} [($clasponsor = awsoadr ($Awfif::codelet-> {l} [$codelet][17]))][2];
            while ((!$foundgd) && ($linki != 0)) {

              if (($Awfif::workspace-> {l} [$linki] [4] == $Awfif::memes-> {snnh} {groupstart}) or ($Awfif::workspace-> {l} [$linki] [4] == $Awfif::memes-> {snnh} {wasgroupstart})) {

                $foundgd = 't';
                $Awfif::wsol-> {l} [$clasponsor][2]
                  = inccounter ( $Awfif::workspace-> {l} [$linki] [3],
                  ($Awfif::workspace-> {l} [$linki] [2]),
                  $Awfif::memes-> {snnh} {groupstart},
                  $Awfif::wsol-> {l} [$clasponsor][2],
                  $clasponsor,
                  undef (),
                  undef (),
                  undef (),
                  $Awfif::codelet-> {l}[$ci] [37],
                  $atelhdr,
                  -1); #indicate if setting a transaction managed counter
                };#if

              $linki = $Awfif::workspace-> {l} [$linki] [0];
              };#while

            $foundgd = '';
            $linki = $Awfif::wsol-> {l} [$clasponsor][2];
            while ((!$foundgd) && ($linki != 0)) {

              if (($Awfif::workspace-> {l} [$linki] [4] == $Awfif::memes-> {snnh} {groupend}) or ($Awfif::workspace-> {l} [$linki] [4] == $Awfif::memes-> {snnh} {wasgroupend})) {

                $foundgd = 't';
                $Awfif::wsol-> {l} [$clasponsor][2]
                  = inccounter ( $Awfif::workspace-> {l} [$linki] [3],
                  ($Awfif::workspace-> {l} [$linki] [2]),
                  $Awfif::memes-> {snnh} {groupend},
                  $Awfif::wsol-> {l} [$clasponsor][2],
                  $clasponsor,
                  undef (),
                  undef (),
                  undef (),
                  $Awfif::codelet-> {l}[$ci] [37],
                  $atelhdr,
                  -1); #indicate if setting a transaction managed counter
                };#if

              $linki = $Awfif::workspace-> {l} [$linki] [0];
              };#while
            };#if new clone created
          };#clone allowed
        };#if
      };#for i3

    $Awfif::memes-> {currentwsbi} = $cwsbi;
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("spcclonex ");
      print ("ret ");
      print ("($result)\n");
      };
    return $result
    }# spcclone
#
#<!-- start tag sia -->
#<!-- start tag ds -resweb -->
#
sub unpackclp {
    my ($myli, $clp, $link) = @_;
    my ($i, $result);
    $result = 0;
# clean up old data
#
# checked for merged workspaces

    for ($i = 2;$i <= $Awfif::memes-> {cpmax}; $i++) {
      $Awfif::codelet-> {l} [$link][$i] = 0;
      };
    $Awfif::codelet-> {l} [$link][27] = '';
    $Awfif::codelet-> {l} [$link][2] = $$clp-> {strategy};
    $Awfif::codelet-> {l} [$link][3] = $$clp-> {urgency};
    $Awfif::codelet-> {l} [$link][13] = $$clp-> {log};
    if (defined ($$clp-> {wsi})) {
      $Awfif::codelet-> {l} [$link][19] = $$clp-> {wsi};
      };
# paramdelayselect
    if (defined ($$clp-> {delayselect})) {
      $Awfif::codelet-> {l} [$link][33] = ($$clp-> {delayselect} * $Awfif::memes-> {delayamp});
      };
    if (defined ($$clp-> {rework})) {
      $Awfif::codelet-> {l} [$link][14] = $$clp-> {rework};
      };

    if ($$clp-> {bond}-> {ni} != 0 ) {
      $Awfif::codelet-> {l} [$link][4] = $$clp-> {bond}-> {ni};
      };
    if ($$clp-> {bond}-> {nidl} != 0 ) {
      $Awfif::codelet-> {l} [$link][5] = $$clp-> {bond}-> {nidl};
      };
    if ($$clp-> {bond}-> {nsnn} != 0 ) {
      $Awfif::codelet-> {l} [$link][6] = $$clp-> {bond}-> {nsnn};
      };
    if ($$clp-> {bond}-> {pi} != 0 ) {
      $Awfif::codelet-> {l} [$link][7] = $$clp-> {bond}-> {pi};
      };
    if ($$clp-> {bond}-> {pidl} != 0 ) {
      $Awfif::codelet-> {l} [$link][8] = $$clp-> {bond}-> {pidl};
      };
    if ($$clp-> {bond}-> {psnn} != 0 ) {
      $Awfif::codelet-> {l} [$link][9] = $$clp-> {bond}-> {psnn};
      };
    if ($$clp-> {bond}-> {category} != 0 ) {
      $Awfif::codelet-> {l} [$link][10] = $$clp-> {bond}-> {category};
      };

    if ($$clp-> {descriptor}-> {property} != 0 ) {# not the slipnet property link
      $Awfif::codelet-> {l} [$link][11] = $$clp-> {descriptor}-> {property};
      };
    if ($$clp-> {descriptor}-> {sponsor} != 0 ) {# original sponsoring concept
      $Awfif::codelet-> {l} [$link][15] = $$clp-> {descriptor}-> {sponsor};
      };
    if ($$clp-> {relation}-> {sponsor} != 0 ) {# original sponsoring concept
      $Awfif::codelet-> {l} [$link][15] = $$clp-> {relation}-> {sponsor};
      };
    if ($$clp-> {descriptor}-> {ni} != 0 ) {
      $Awfif::codelet-> {l} [$link][4] = $$clp-> {descriptor}-> {ni};
      };
    if ($$clp-> {descriptor}-> {snnode} != 0 ) {
      $Awfif::codelet-> {l} [$link][12] = $$clp-> {descriptor}-> {snnode};
      };

    if ($$clp-> {relation}-> {ni} != 0 ) {
      $Awfif::codelet-> {l} [$link][4] = $$clp-> {relation}-> {ni};
      };
    if ($$clp-> {relation}-> {nidl} != 0 ) {
      $Awfif::codelet-> {l} [$link][5] = $$clp-> {relation}-> {nidl};
      };
    if ($$clp-> {relation}-> {nsnn} != 0 ) {
      $Awfif::codelet-> {l} [$link][6] = $$clp-> {relation}-> {nsnn};
      };
    if ($$clp-> {relation}-> {pi} != 0 ) {
      $Awfif::codelet-> {l} [$link][7] = $$clp-> {relation}-> {pi};
      };
    if ($$clp-> {relation}-> {pidl} != 0 ) {
      $Awfif::codelet-> {l} [$link][8] = $$clp-> {relation}-> {pidl};
      };
    if ($$clp-> {relation}-> {psnn} != 0 ) {
      $Awfif::codelet-> {l} [$link][9] = $$clp-> {relation}-> {psnn};
      };
    if ($$clp-> {relation}-> {category} != 0 ) {
      $Awfif::codelet-> {l} [$link][10] = $$clp-> {relation}-> {category};
      };

    if ($$clp-> {group}-> {model} != 0 ) {# group is being modelled
      $Awfif::codelet-> {l} [$link][16] = $$clp-> {group}-> {model};
      };
    if ($$clp-> {group}-> {sponsor} != 0 ) {# group sponsoring wso
      $Awfif::codelet-> {l} [$link][17] = $$clp-> {group}-> {sponsor};
      };

    if ($$clp-> {action}-> {ref} != 0 ) {
      $Awfif::codelet-> {l} [$link][4] = $$clp-> {action}-> {ref};
      };
# paramssgws
    if ($$clp-> {action}-> {ssgws} != 0 ) {
      $Awfif::codelet-> {l} [$link][5] = $$clp-> {action}-> {ssgws};
      };
    if ($$clp-> {action}-> {ssgoid} != 0 ) {
      $Awfif::codelet-> {l} [$link][6] = $$clp-> {action}-> {ssgoid};
      };
    if ($$clp-> {action}-> {signal} != 0 ) {# action is linked to signal
      $Awfif::codelet-> {l} [$link][16] = $$clp-> {action}-> {signal};
      };
    if ($$clp-> {action}-> {sponsor} != 0 ) {# group sponsoring wso
      $Awfif::codelet-> {l} [$link][17] = $$clp-> {action}-> {sponsor};
      };
    if ($$clp-> {action}-> {schema} != 0 ) {# actions start point
      $Awfif::codelet-> {l} [$link][18] = $$clp-> {action}-> {schema};
      };
    if ($$clp-> {action}-> {sws} != 0 ) {# refs schemas workspace index
      $Awfif::codelet-> {l} [$link][20] = $$clp-> {action}-> {sws};
      };
    if ($$clp-> {action}-> {wss} != 0 ) {# refs schemas wso start index
      $Awfif::codelet-> {l} [$link][21] = $$clp-> {action}-> {wss};
      };
    if ($$clp-> {action}-> {wsoname} != 0 ) {# refs schemas wso name
      $Awfif::codelet-> {l} [$link][25] = $$clp-> {action}-> {wsoname};
      };
    if ($$clp-> {action}-> {wse} != 0 ) {# refs schemas wso end index
      $Awfif::codelet-> {l} [$link][22] = $$clp-> {action}-> {wse};
      };
# paramjhlsiref
    if ($$clp-> {action}-> {jhlabeli} != 0 ) {# refs schemas wso label
      $Awfif::codelet-> {l} [$link][23] = $$clp-> {action}-> {jhlabeli};
      };
    if ($$clp-> {action}-> {pmman} != 0 ) {# refs schemas wso end index
      $Awfif::codelet-> {l} [$link][26] = $$clp-> {action}-> {pmman};
      };
    if ($$clp-> {action}-> {wss} != 0 ) {# refs schemas wso gap start index
      $Awfif::codelet-> {l} [$link][28] = $$clp-> {action}-> {wsgs};
      };
    if ($$clp-> {action}-> {wss} != 0 ) {# refs schemas wso gap end index
      $Awfif::codelet-> {l} [$link][29] = $$clp-> {action}-> {wsge};
      };
    if ($$clp-> {action}-> {jhlabeloi} != 0 ) {# refs schemas original sponsor wso operon
      $Awfif::codelet-> {l} [$link][30] = $$clp-> {action}-> {jhlabeloi};
      $result = $$clp-> {action}-> {jhlabeloi};
      };
# paramsgjhlsiref
    if ($$clp-> {action}-> {sgjhlsi} != 0 ) {# refs schemas nuclear subgroup wso operon
      $Awfif::codelet-> {l} [$link][31] = $$clp-> {action}-> {sgjhlsi};
      };
# paramtfree
    if ($$clp-> {action}-> {tfree} != 0 ) {# transaction sponsor cant free
      $Awfif::codelet-> {l} [$link][32] = $$clp-> {action}-> {tfree};
      };
# paramtransid
    if ($$clp-> {action}-> {transid} != 0 ) {# transaction id protected
      $Awfif::codelet-> {l} [$link][35] = $$clp-> {action}-> {transid};
      };
# paramsubpi
    if ($$clp-> {action}-> {subpi} != 0 ) {# subprogram
      $Awfif::codelet-> {l} [$link][36] = $$clp-> {action}-> {subpi};
      };
# unpacktrmgru1
    if ((($Awfif::codelet-> {l} [$link][35] != 0 ) or ($Awfif::codelet-> {l} [$link][36] != 0 ))
    && ($Awfif::codelet-> {l} [$link][35] != $Awfif::codelet-> {l} [$myli][35])#if these are the same a clone of self is being produced - so already has a transaction
    ){# subprogram

      &transmgr ($myli, $link, $Awfif::memes-> {snnh} {begin}, $Awfif::memes-> {snnh} {rtran});
      };
# paramtransmgrid
    if ($$clp-> {action}-> {transmgrid} != 0 ) {# transaction manager index
      $Awfif::codelet-> {l} [$link][37] = $$clp-> {action}-> {transmgrid};
# have to record that builder is submitted to trun
      if ($Awfif::codelet-> {l} [$myli] [2] =~ /evaluator/i) {
        $Awfif::tmassl-> {submitted} [$Awfif::codelet-> {l}[$link][37]] = $Awfif::codelet-> {l} [$link] [2];
        };#if
      };
# paramusepooling
    if ($$clp-> {action}-> {usepooling} != 0 ) {# schematic pooling of codelets
      $Awfif::codelet-> {l} [$link][38] = $$clp-> {action}-> {usepooling};
      };#if

    if ($$clp-> {inhib}-> {ilinkp} != 0 ) {# inhibitor link pointer
      $Awfif::codelet-> {l} [$link][24] = $$clp-> {inhib}-> {ilinkp};
      };
    return $result;
    } # unpackclp
#
#<!-- end tag sia -->
#<!-- end tag ds -->
#
sub copyclp {
    my ($myli, $clp, $copy, $index) = @_;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("copyclp myli $myli index $index ");
      };
    $$copy [$index][1] = $$clp-> {strategy};
    $$copy [$index][2] = $$clp-> {urgency};
    $$copy [$index][3] = $$clp-> {log};
    $$copy [$index][4] = $$clp-> {wsi};
    $$copy [$index][5] = $$clp-> {rework};
    $$copy [$index][6] = $$clp-> {bond}-> {ni};
    $$copy [$index][7] = $$clp-> {bond}-> {nidl};
    $$copy [$index][8] = $$clp-> {bond}-> {nsnn};
    $$copy [$index][9] = $$clp-> {bond}-> {pi};
    $$copy [$index][10] = $$clp-> {bond}-> {pidl};
    $$copy [$index][11] = $$clp-> {bond}-> {psnn};
    $$copy [$index][12] = $$clp-> {bond}-> {category};
    $$copy [$index][13] = $$clp-> {descriptor}-> {property};
    $$copy [$index][14] = $$clp-> {descriptor}-> {sponsor};
    $$copy [$index][15] = $$clp-> {relation}-> {sponsor};
    $$copy [$index][16] = $$clp-> {descriptor}-> {ni};
    $$copy [$index][17] = $$clp-> {descriptor}-> {snnode};
    $$copy [$index][18] = $$clp-> {relation}-> {ni};
    $$copy [$index][19] = $$clp-> {relation}-> {nidl};
    $$copy [$index][20] = $$clp-> {relation}-> {nsnn};
    $$copy [$index][21] = $$clp-> {relation}-> {pi};
    $$copy [$index][22] = $$clp-> {relation}-> {pidl};
    $$copy [$index][23] = $$clp-> {relation}-> {psnn};
    $$copy [$index][24] = $$clp-> {relation}-> {category};
    $$copy [$index][25] = $$clp-> {group}-> {model};
    $$copy [$index][26] = $$clp-> {group}-> {sponsor};
    $$copy [$index][27] = $$clp-> {action}-> {ref};
    $$copy [$index][28] = $$clp-> {action}-> {signal};
    $$copy [$index][29] = $$clp-> {action}-> {sponsor};
    $$copy [$index][30] = $$clp-> {action}-> {schema};
    $$copy [$index][31] = $$clp-> {action}-> {sws};
    $$copy [$index][32] = $$clp-> {action}-> {wss};
    $$copy [$index][33] = $$clp-> {action}-> {wse};
    $$copy [$index][34] = $$clp-> {action}-> {jhlabeli};
    $$copy [$index][35] = $$clp-> {inhib}-> {ilinkp};
    $$copy [$index][36] = $$clp-> {action}-> {pmman};
    $$copy [$index][37] = $$clp-> {action}-> {jhlabeloi};
    $$copy [$index][38] = $$clp-> {action}-> {sgjhlsi};
    $$copy [$index][39] = $$clp-> {action}-> {tfree};
    $$copy [$index][40] = $$clp-> {delayselect};
    $$copy [$index][41] = $$clp-> {action}-> {transid};
    $$copy [$index][42] = $$clp-> {action}-> {subpi};
    $$copy [$index][43] = $$clp-> {action}-> {usepooling};

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("copyclpx \n");
      };
    }# copyclp
#
sub loadclp {
    my ($myli, $clp, $copy, $index) = @_;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("loadclp myli $myli index $index ");
      };
    $$clp-> {strategy} = $$copy [$index][1];
    $$clp-> {urgency} = $$copy [$index][2];
    $$clp-> {log} = $$copy [$index][3];
    $$clp-> {wsi} = $$copy [$index][4];
    $$clp-> {rework} = $$copy [$index][5];
    $$clp-> {bond}-> {ni} = $$copy [$index][6];
    $$clp-> {bond}-> {nidl} = $$copy [$index][7];
    $$clp-> {bond}-> {nsnn} = $$copy [$index][8];
    $$clp-> {bond}-> {pi} = $$copy [$index][9];
    $$clp-> {bond}-> {pidl} = $$copy [$index][10];
    $$clp-> {bond}-> {psnn} = $$copy [$index][11];
    $$clp-> {bond}-> {category} = $$copy [$index][12];
    $$clp-> {descriptor}-> {property} = $$copy [$index][13];
    $$clp-> {descriptor}-> {sponsor} = $$copy [$index][14];
    $$clp-> {relation}-> {sponsor} = $$copy [$index][15];
    $$clp-> {descriptor}-> {ni} = $$copy [$index][16];
    $$clp-> {descriptor}-> {snnode} = $$copy [$index][17];
    $$clp-> {relation}-> {ni} = $$copy [$index][18];
    $$clp-> {relation}-> {nidl} = $$copy [$index][19];
    $$clp-> {relation}-> {nsnn} = $$copy [$index][20];
    $$clp-> {relation}-> {pi} = $$copy [$index][21];
    $$clp-> {relation}-> {pidl} = $$copy [$index][22];
    $$clp-> {relation}-> {psnn} = $$copy [$index][23];
    $$clp-> {relation}-> {category} = $$copy [$index][24];
    $$clp-> {group}-> {model} = $$copy [$index][25];
    $$clp-> {group}-> {sponsor} = $$copy [$index][26];
    $$clp-> {action}-> {ref} = $$copy [$index][27];
    $$clp-> {action}-> {signal} = $$copy [$index][28];
    $$clp-> {action}-> {sponsor} = $$copy [$index][29];
    $$clp-> {action}-> {schema} = $$copy [$index][30];
    $$clp-> {action}-> {sws} = $$copy [$index][31];
    $$clp-> {action}-> {wss} = $$copy [$index][32];
    $$clp-> {action}-> {wse} = $$copy [$index][33];
    $$clp-> {action}-> {jhlabeli} = $$copy [$index][34];
    $$clp-> {action}-> {pmman} = $$copy [$index][36];
    $$clp-> {inhib}-> {ilinkp} = $$copy [$index][35];
    $$clp-> {action}-> {jhlabeloi} = $$copy [$index][37];
    $$clp-> {action}-> {sgjhlsi} = $$copy [$index][38];
    $$clp-> {action}-> {tfree} = $$copy [$index][39];
    $$clp-> {delayselect} = $$copy [$index][40];
    $$clp-> {action}-> {transid} = $$copy [$index][41];
    $$clp-> {action}-> {subpi} = $$copy [$index][42];
    $$clp-> {action}-> {usepooling} = $$copy [$index][43];

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("loadclpx \n");
      };
    }# loadclp
#
sub newcodeletl {
    my ($myli, $clp, $deferred) = @_;
# strategy is a codeaddress
# urgency is an integer
#
#
# checked for merged workspaces

    my ($link, $tt, $h, $f, $jhlsoi, $type);
    $tt = $Awfif::memes-> {codelett};
    $h = $Awfif::memes-> {codeleth};
    $f = $Awfif::memes-> {codeletf};
    if (defined ($deferred) && ($deferred) ){#deferred queue

      $link = $Awfif::memes-> {codeletdef};
      $type = $Awfif::memes-> {snnh} {deferred};
      }#if
    elsif (defined ($Awfif::clp-> {delayselect}) && ($Awfif::clp-> {delayselect} > 0) ){#wait queue

      $link = $Awfif::memes-> {codeletw};
      $type = $Awfif::memes-> {snnh} {wait};
      }#elsif
    else {

      $link = $Awfif::memes-> {codeleth};
      $type = $Awfif::memes-> {snnh} {active};
      };#else
    $link = newlink ($link, \$Awfif::codelet);
    $Awfif::codelet-> {t} [$link] = $type;
    if (($jhlsoi = unpackclp ($myli, \$$clp, $link)) != 0) {

      $Awfif::jhls-> {l} [$jhlsoi] [14] [2]++;
      };#if
    return $link;
    } # newcodeletl
#
#<!-- start tag scc -->
#
sub submitcodelet {
    my ($myli, $clp, $deferred, $addbreak) = @_;
#
    my ($pflink, $plink, $utail, $tt, $f, $h, $w, $jhlsoi, $bcindex);
# create an active codelet
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("submitcodelet ");
      };
    if ((defined ($Awfif::codelet-> {l} [0] [1]))
    ){

      &break ();
      };#if

    $tt = $Awfif::memes-> {codelett};
    $h = $Awfif::memes-> {codeleth};
    $w = $Awfif::memes-> {codeletw};
    $f = $Awfif::memes-> {codeletf};
    $utail = '';
    if (($Awfif::memes-> {codelett} == 0)
    && ($Awfif::memes-> {codeleth} == 0)) {

      $utail = 'T';
      }; #note need to update tail
    $pflink = $Awfif::memes-> {codeletf};
    if ($pflink != 0 ) {
# can reclaim one from the inactive list

      $Awfif::memes-> {submitted} = $pflink;
      $Awfif::memes-> {fcodelets}--;
      $plink = $Awfif::codelet-> {l} [$pflink][0];
      if ($plink != 0) {

        $Awfif::codelet-> {l} [$plink ][1]=0; #sentinal
        $Awfif::memes-> {codeletf} = $plink;
        }# if
      else {#zero the free head ptr

        $Awfif::memes-> {codeletf} = 0;
        }; # else
      if ((defined ($deferred)) && ($deferred)) {

        $Awfif::codelet-> {l} [$pflink][0] = $Awfif::memes-> {codeletdef};
        if ($Awfif::memes-> {codeletdef} != 0) {

          $Awfif::codelet-> {l} [$Awfif::memes-> {codeletdef}] [1] = $pflink;
          };#if
        $Awfif::memes-> {codeletdef} = $pflink;
        $Awfif::codelet-> {t} [$pflink] = $Awfif::memes-> {snnh} {deferred};
        }#if
# submitcudsel
      elsif (defined ($Awfif::clp-> {delayselect}) && ($Awfif::clp-> {delayselect} > 0) ){#wait queue

        $Awfif::codelet-> {l} [$pflink][0] = $Awfif::memes-> {codeletw};
        if ($Awfif::memes-> {codeletw} != 0) {

          $Awfif::codelet-> {l} [$Awfif::memes-> {codeletw}] [1] = $pflink;
          };#if
        $Awfif::memes-> {codeletw} = $pflink;
        $Awfif::codelet-> {t} [$pflink] = $Awfif::memes-> {snnh} {wait};
        }#if
      else {

        $Awfif::codelet-> {l} [$pflink][0] = $Awfif::memes-> {codeleth};
        $Awfif::memes-> {acodelets} ++;#new active codelet
        if ($Awfif::memes-> {acodelets} > $Awfif::memes-> {tcodelets} ){ &break ();};
        if ($Awfif::memes-> {codeleth} != 0) {

          $Awfif::codelet-> {l} [$Awfif::memes-> {codeleth}] [1] = $pflink;
          };#if
        $Awfif::memes-> {codeleth} = $pflink;
        $Awfif::codelet-> {t} [$pflink] = $Awfif::memes-> {snnh} {active};
        };#else
# submitcmbcul
      if (($bcindex = matchbreakcodelet ($myli)) > 0) {

        if ((defined ($addbreak)) && ($addbreak) ){

          $Awfif::memes-> {breakcodelet} [++$Awfif::memes-> {breakcodelet} [0]] = $pflink;
          if ($$clp-> {action}-> {subpi} != 0) {

            $Awfif::memes-> {breaksubp} [++$Awfif::memes-> {breaksubp} [0]] = $$clp-> {action}-> {subpi};
            }#if
          else {

            $Awfif::memes-> {breaksubp} [++$Awfif::memes-> {breaksubp} [0]] = $Awfif::codelet-> {l}[$myli][36];
            };#else
          }#if
        else {
          $Awfif::memes-> {breakcodelet} [$bcindex] = $pflink;
          if ($$clp-> {action}-> {subpi} != 0) {

            $Awfif::memes-> {breaksubp} [$bcindex] = $$clp-> {action}-> {subpi};
            }#if
          else {

            $Awfif::memes-> {breaksubp} [$bcindex] = $Awfif::codelet-> {l}[$myli][36];
            };#else
          };#else
        };#if
      &trackcodelet ($myli, $pflink, $Awfif::memes-> {snnh} {assocf1}, undef(), undef(), $Awfif::codelet-> {l} [$myli] [36], $$clp);
      if (($jhlsoi = unpackclp ($myli, \$$clp, $pflink)) != 0) {

        $Awfif::jhls-> {l} [$jhlsoi] [14] [2]++;
        };#if
# submitcafbu2

      if (($Awfif::codelet-> {t} [$pflink] == $Awfif::memes-> {snnh} {active})
      &&($Awfif::codelet-> {l} [$pflink] [2] eq 'groupbuilder')
      ){

        &addfb ($pflink);#list added codelets by name
        };#if
      }# found free links
    else {
# if there weren't any then get a newone

      my ($transtype);
      $Awfif::memes-> {tcodelets}++;
# submitcietu1
      if (($$clp-> {action}-> {subpi} != 0) or ($$clp-> {action}-> {transid} != 0) ) {
        $transtype = $Awfif::memes-> {snnh} {rtran};
        }#if
      else {
        $transtype = $Awfif::memes-> {snnh} {indequiv};
        };#else
      if ((defined ($deferred)) && ($deferred)) {

        $Awfif::memes-> {codeletdef} = newcodeletl ($myli, \$$clp, $deferred);
        $Awfif::memes-> {submitted} = $Awfif::memes-> {codeletdef};
# submitcietu2
        &transmgr (undef(), $Awfif::memes-> {codeletdef}, $Awfif::memes-> {snnh} {begin}, $transtype);
        if ($Awfif::memes-> {acodelets} > $Awfif::memes-> {tcodelets} ){ &break ();};
        if (($bcindex = matchbreakcodelet ($myli)) > 0) {

          if ((defined ($addbreak)) && ($addbreak) ){

            $Awfif::memes-> {breakcodelet} [++$Awfif::memes-> {breakcodelet} [0]] = $Awfif::memes-> {codeletdef};
            $Awfif::memes-> {breaksubp} [++$Awfif::memes-> {breaksubp} [0]] = $Awfif::codelet-> {l}[$myli][36];
            }#if
          else {

            $Awfif::memes-> {breakcodelet} [$bcindex] = $Awfif::memes-> {codeletdef};
            $Awfif::memes-> {breaksubp} [$bcindex] = $Awfif::codelet-> {l}[$myli][36];
            };#else
          };#if
        &trackcodelet ($myli, $Awfif::memes-> {codeletdef}, $Awfif::memes-> {snnh} {assocf1}, undef(), undef(), $Awfif::codelet-> {l} [$myli] [36]);
        }#if
      elsif (defined ($Awfif::clp-> {delayselect}) && ($Awfif::clp-> {delayselect} > 0) ){#wait queue

        $Awfif::memes-> {codeletw} = newcodeletl ($myli, \$$clp);
        $Awfif::memes-> {submitted} = $Awfif::memes-> {codeletw};
# submitcietu3
        &transmgr (undef(), $Awfif::memes-> {codeletw}, $Awfif::memes-> {snnh} {begin}, $transtype);
        if (($bcindex = matchbreakcodelet ($myli)) > 0) {

          if ((defined ($addbreak)) && ($addbreak) ){

            $Awfif::memes-> {breakcodelet} [++$Awfif::memes-> {breakcodelet} [0]] = $Awfif::memes-> {codeletw};
            $Awfif::memes-> {breaksubp} [++$Awfif::memes-> {breaksubp} [0]] = $Awfif::codelet-> {l}[$myli][36];
            }#if
          else {

            $Awfif::memes-> {breakcodelet} [$bcindex] = $Awfif::memes-> {codeletw};
            $Awfif::memes-> {breaksubp} [$bcindex] = $Awfif::codelet-> {l}[$myli][36];
            };#else
          };#if
        &trackcodelet ($myli, $Awfif::memes-> {codeletw}, $Awfif::memes-> {snnh} {assocf1}, undef(), undef(), $Awfif::codelet-> {l} [$myli] [36]);
        }#elsif
      else {

        $Awfif::memes-> {acodelets} ++;#new active codelet
        if ($Awfif::memes-> {acodelets} > $Awfif::memes-> {tcodelets} ){ &break ();};
        $Awfif::memes-> {codeleth} = newcodeletl ($myli, \$$clp);
        $Awfif::memes-> {submitted} = $Awfif::memes-> {codeleth};
# submitcietu4
        if (($bcindex = matchbreakcodelet ($myli)) > 0) {

          if ((defined ($addbreak)) && ($addbreak) ){

            $Awfif::memes-> {breakcodelet} [++$Awfif::memes-> {breakcodelet} [0]] = $Awfif::memes-> {codeleth};
            $Awfif::memes-> {breaksubp} [++$Awfif::memes-> {breaksubp} [0]] = $Awfif::codelet-> {l}[$myli][36];
            }#if
          else {

            $Awfif::memes-> {breakcodelet} [$bcindex] = $Awfif::memes-> {codeleth};
            $Awfif::memes-> {breaksubp} [$bcindex] = $Awfif::codelet-> {l}[$myli][36];
            };#else
          };#if
        &trackcodelet ($myli, $Awfif::memes-> {codeleth}, $Awfif::memes-> {snnh} {assocf1}, undef(), undef(), $Awfif::codelet-> {l} [$myli] [36]);
# submitcafbul

        if ($Awfif::codelet-> {l} [$Awfif::memes-> {codeleth}] [2] eq 'groupbuilder'){

          &addfb ($Awfif::memes-> {codeleth});#list added codelets by name
          };#if
        };#else
      }; #else
    if ($utail) {

      $Awfif::memes-> {codelett} = $Awfif::memes-> {codeleth};
      };# update tail
    $tt = $Awfif::memes-> {codelett};
    $h = $Awfif::memes-> {codeleth};
    $f = $Awfif::memes-> {codeletf};
    if ((defined ($Awfif::codelet-> {l} [0] [1]))
    ){

      &break ();
      };#if
    if (($Awfif::memes-> {submitted} > 0) && (($Awfif::codelet-> {l} [$Awfif::memes-> {submitted}][0] == $Awfif::memes-> {submitted}) or ($Awfif::codelet-> {l} [$Awfif::memes-> {submitted}][1] == $Awfif::memes-> {submitted})) ) {

      &break ();
      };# check for circular references
    if ( (($Awfif::memes-> {codelett} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codelett}][0] == 0))
    && (($Awfif::memes-> {codelett} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codelett}][1] == 0))
    && ($Awfif::memes-> {codelett} != $Awfif::memes-> {codeleth})
    ){

      &break ();
      };# check for circular references

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr, $pr2);
      if ((defined ($deferred)) && ($deferred)) {
        $pr = $Awfif::memes-> {codeletdef};
        }#if
      else {
        $pr = $Awfif::memes-> {codeleth};
        };#else
      print ("submitcodeletx h $pr ");
      $pr2 = $Awfif::codelet-> {l} [$pr] [19];
      print ("ws($pr2)\n");
      };
    }#submitcodelet
#
#<!-- end tag scc -->
#
sub cdsubmitcodelet {
    my ($myli, $clp, $deferred, $addbreak) = @_;
#
    my ($newli, $wait);
# create an active codelet preserving rework count
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("cdsubmitcodelet myli $myli ");
      };
    $wait = (defined ($Awfif::clp-> {delayselect}) && ($Awfif::clp-> {delayselect} > 0));
    &submitcodelet ($myli, \$$clp, $deferred, $addbreak);

    if ((defined ($deferred)) && ($deferred)) {
      $newli = $Awfif::memes-> {codeletdef};
      }#if
    elsif ($wait) {
      $newli = $Awfif::memes-> {codeletw};
      }#elsif
    else {
      $newli = $Awfif::memes-> {codeleth};
      };
    $Awfif::codelet-> {l} [$newli][14] = $Awfif::codelet-> {l} [$myli][14];
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr);
      $pr = $Awfif::codelet-> {l} [$newli][14];
      print ("cdsubmitcodeletx rework $pr ret($newli)\n");
      };
    return $newli
    }#cdsubmitcodelet
#
#
sub icdsubmitcodelet {
    my ($myli, $clp, $inhibh, $grkwp, $grkwpr, $sactset) = @_;
#
    my ($newli);
# create an active codelet preserving rework count
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("icdsubmitcodelet myli $myli inhibh ($inhibh) grkwp $grkwp grkwpr $grkwpr ");
      };
# is there any active competitive inhibitor for this operon in which case run it. It will launch the action scout when inhibition ends

    if ($inhibh ne '') {

      my ($icpt, $found, $noinhibition, $linkp, $ilinkp);
      &copyclp ($myli, \$$clp, \@{$Awfif::inhibl-> {clpa}}, $inhibh);
      $ilinkp = $inhibh;
      $found = '';
      while (($ilinkp != 0) && (!$found)) {
        $icpt = $Awfif::inhibl-> {l} [$ilinkp] [2];
        $linkp = $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$icpt];

        while (($linkp != 0) && (!$found)) {
          if (($Awfif::slipnet-> {l}[$linkp][3] == $Awfif::memes-> {snnh}{inhibitor})
          && (defined($Awfif::memes-> {binds}-> {$Awfif::memes->{snnih}{$Awfif::slipnet-> {l} [$linkp][2]}}))) {#can launch the real routine

            my ($jhls);
            $jhls = $$clp-> {action}-> {jhlabeloi};
            $found = 't';
            $Awfif::codelet-> {l} [$myli] [24] = $ilinkp;
            &ucsehist ($Awfif::memes->{snnih}{$Awfif::slipnet-> {l} [$linkp][2]});
            no strict 'refs';
            $noinhibition = $Awfif::memes-> {binds}-> {$Awfif::memes->{snnih}{$Awfif::slipnet-> {l} [$linkp][2]}}-> ($myli, \$grkwp, $grkwpr, \@$sactset);
            if (!$noinhibition) {

              $Awfif::jhls-> {l} [$jhls] [14] [2] --;#get rid of the record of this dummy cdsubmit
              };
            }
          $linkp = $Awfif::slipnet-> {l} [$linkp] [0];
          };#while
        $ilinkp = $Awfif::inhibl-> {l} [$ilinkp] [0];
        };#while
      if ((!$found)) {#failed so submit the codelet
        &cdsubmitcodelet ($myli, \$$clp);
        $Awfif::inhibl-> {clpa} [ $inhibh] = ();
        }#if not found
      elsif (($noinhibition)) {
        };#else
      }# of inhibitor control
    else {


    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr);
      $pr = $Awfif::codelet-> {l} [$newli][14];
      print ("icdsubmitcodeletx rework $pr\n");
      };
    }#icdsubmitcodelet
#
#
#<!-- start tag scc -->
#<!-- start tag uts -->
#<!-- start tag sia -->
#<!-- start tag ds -resweb -->
#<!-- start tag vbt -->
#
sub freecodelet {
    my ($codelet, $mode, $rcantd) = @_;
    my ($plink, $tt, $h, $f, $cantd, $ws, $cwsbi, $bcindex, $transmgd, $doremarrent, $response, $ctype);
#
# move the codelet datastructure to the inactive list
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr);
      $pr = $codelet;
      print ("freecodelet codelet $pr ");
      $pr = $Awfif::codelet-> {l} [$codelet] [19];
      print ("ws($pr) mode ($mode)\n");
      };
    $response = 1;#can keep deleting
    if ((defined ($Awfif::codelet-> {l} [0] [1]))
    ){

      &break ();
      };#if
# break if codelet matches breakcodelet
    if ( (($bcindex = matchbreakcodelet ($codelet)) > 0)
    && (($mode != 1) #this has been run
    or ($Awfif::codelet-> {l} [$codelet][23] == 0)
    or ( ($Awfif::codelet-> {l} [$codelet][23] != 0) && ($Awfif::memes-> {snw} [$ws]-> {snna} {$Awfif::memes-> {snnih} {$Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$codelet] [23]] [6]}} > $Awfif::memes-> {killth}) ) )
    ){

      break ();
      $doremarrent = $bcindex;
      };#if
    $Awfif::memes-> {listrelinking} = 't';
    $ctype = $Awfif::codelet-> {t} [$codelet];
# freectmu1
# note if codelet is transaction managed
    if ($Awfif::codelet->{l} [$codelet] [37] > 0) {

      $transmgd = 't';
      }#if
    else {

      $transmgd = '';
      };#else
# handle codelets that can't be deleted due to activation or inhibition
# freecmdfup4

      if ((defined ($Awfif::memes-> {usetdfmod}))
      && ($Awfif::memes-> {usetdfmod})
      && ((!defined ($mode)) or ($mode != 1)) #failed to run
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tgroupscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tmodelscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'modelevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'modelbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tnuclabmscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nuclabmevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nuclabmbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tnsdepscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nsdepevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nsdepbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tgoalscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'goalevaluator')
      ){#update transactional deployment failures

        if ( ($Awfif::codelet-> {l} [$codelet][35] > 0)
        && ($Awfif::codelet-> {l} [$codelet][36] > 0)
        ){#update transactional deployment failures

          if ($Awfif::subpl-> {q} [1] [ $Awfif::codelet-> {l} [$codelet][36] ] < $Awfif::memes-> {freeampth}) {
            $Awfif::subpl-> {q} [1] [ $Awfif::codelet-> {l} [$codelet][36] ]++;
            }#if
          else {

            if ( (defined ($Awfif::memes-> {freecabreak}))
            && ($Awfif::memes-> {freecabreak} )
            ){

              &break();
              };#if
            $Awfif::subpl-> {q} [1] [ $Awfif::codelet-> {l} [$codelet][36] ] = 0;
            $Awfif::subpl-> {q} [0] [ $Awfif::codelet-> {l} [$codelet][36] ] ++;
            };#else
          }#if
        elsif ( ($Awfif::codelet-> {l} [$codelet][35] > 0)
        ){

          $Awfif::memes-> {mainco} = $Awfif::memes-> {mainco} + 1;
          };#elsif
        }#if

      my ($nlink);
# freecmtailup1
      if (($Awfif::codelet->{l} [$codelet] [34] == 0)
      && (($codelet != $Awfif::memes-> {codeleth})
      or ($Awfif::memes-> {codelett} != $Awfif::memes-> {codeleth}))) {# move to head
        if ($codelet == $Awfif::memes-> {codelett}) {#tail so special move

          $nlink = $Awfif::codelet-> {l} [$codelet][1];#nearer the head
          $Awfif::codelet-> {l} [$codelet][0] = $Awfif::memes->{codeleth};
          $Awfif::codelet-> {l} [$Awfif::memes->{codeleth}][1] = $codelet;
          $Awfif::memes->{codeleth} = $codelet;
          $Awfif::codelet-> {l} [$codelet][1] = 0;
          $Awfif::memes-> {codelett} = $nlink;
          $Awfif::codelet-> {l} [$nlink][0] = 0;
          }#if
        else {

          $plink = $Awfif::codelet-> {l} [$codelet][0];#towards the tail
          $nlink = $Awfif::codelet-> {l} [$codelet][1];#nearer the head
          $Awfif::codelet-> {l} [$codelet][0] = $Awfif::memes->{codeleth};
          $Awfif::codelet-> {l} [$Awfif::memes->{codeleth}][1] = $codelet;
          $Awfif::memes->{codeleth} = $codelet;
          $Awfif::codelet-> {l} [$codelet][1] = 0;
          $Awfif::codelet-> {l} [$plink][1] = $nlink;
          $Awfif::codelet-> {l} [$nlink][0] = $plink;
          };#else general move
        }# if can move
# frees34tup1
      elsif ( ($Awfif::codelet->{l} [$codelet] [34] != 0)
      && ($codelet == $Awfif::memes-> {codelett})
      && (freeswitch34tail ($codelet, $mode))
      ){

        my ($ltail);
        $ltail = $Awfif::memes-> {codelett};
        if ((freescheckcantd ($ltail)) ){

          if (($Awfif::memes-> {freectcantdbreak}) ){ &break ()};
          $response = 0;#stop delete or will just loop
          }#if
        else {

          $response = -1;
          };#else
        }#elsif
      else {

        $response = 0;#should stop trying to delete as waste of time
        };#else failed to move undeletable tail
      }#$cantd
    else {
# freecmdfup1

      if ((defined ($Awfif::memes-> {usetdfmod}))
      && ($Awfif::memes-> {usetdfmod})
      && ((!defined ($mode)) or ($mode != 1)) #failed to run
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tgroupscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tmodelscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'modelevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'modelbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tnuclabmscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nuclabmevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nuclabmbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tnsdepscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nsdepevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nsdepbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tgoalscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'goalevaluator')
      ){#update transactional deployment failures

        if ( ($Awfif::codelet-> {l} [$codelet][35] > 0)
        && ($Awfif::codelet-> {l} [$codelet][36] > 0)
        ){#update transactional deployment failures

          $Awfif::subpl-> {q} [0] [ $Awfif::codelet-> {l} [$codelet][36] ]++;
          }#if
# freecmdfup2
        elsif ( ($Awfif::codelet-> {l} [$codelet][35] > 0)
        ){

          $Awfif::memes-> {mainco} = $Awfif::memes-> {mainco} + $Awfif::memes-> {maininc};
          };#elsif
        }#if
      elsif ((defined ($Awfif::memes-> {usetdfmod}))
      && ($Awfif::memes-> {usetdfmod})
      && ($mode == 1) #codelet has run
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tgroupscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'groupbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tmodelscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'modelevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'modelbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tnuclabmscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nuclabmevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nuclabmbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tnsdepscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nsdepevaluator')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'nsdepbuilder')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'tgoalscout')
      && ($Awfif::codelet-> {l} [$codelet][2] ne 'goalevaluator')
      ){

        if ( ($Awfif::codelet-> {l} [$codelet][35] > 0)
        && ($Awfif::codelet-> {l} [$codelet][36] == 0)
        && ($Awfif::memes-> {mainco} > 0)
        ){#update transactional deployment failures
# freecmdfup3

          $Awfif::memes-> {mainco} --;
          }#if
        };#elsif
      &trackcodelet ($codelet, $codelet, $Awfif::memes-> {snnh} {free}, $mode);
# freecfbu1

      if (($ctype == $Awfif::memes-> {snnh} {active})
      && ($Awfif::codelet-> {l} [$codelet] [2] eq 'groupbuilder')
      ){

        &freefb ($codelet);
        };#if its a free from the active list
# freecupoolup1
      if ($Awfif::codelet-> {l} [$codelet] [38] > 0) {#remove the initial pool reference

        my ($i, $found, $linki);
        $found = '';
        for ($i = 0;((!$found) && ($i < $Awfif::memes-> {totup})); $i++){#use head reference to check the list of elements for a match
          $linki = $Awfif::subpl-> {q} [3] [$i] [$Awfif::codelet-> {l} [$codelet] [36] ];#linki is an index into $Awfif::poolcl-> {l} list
          while (($linki != 0 ) && (!$found)){
            if ($Awfif::poolcl-> {l} [$linki ][2] == $codelet){#found this codelet

              if ((defined ($Awfif::memes-> {freecupoolb})) && ($Awfif::memes-> {freecupoolb} == $Awfif::codelet-> {l} [$codelet] [36]) ){

                &break ();
                };#if
              $found = 't';
              $Awfif::subpl-> {q} [3] [$i] [$Awfif::codelet-> {l} [$codelet] [36] ] = freepoolc ($linki);
              }#if
            else {

              $linki = $Awfif::poolcl-> {l} [$linki ][0];
              };#
            };#while
          };#for
        $Awfif::codelet-> {l} [$codelet] [38] = 0;
        };#if
      if ($doremarrent > 0) {

        &remarrent ($doremarrent, \@{$Awfif::memes-> {breakcodelet}});
        &remarrent ($doremarrent, \@{$Awfif::memes-> {breaksubp}});
        };#if
# freecjhlsoiup2
      if (($Awfif::codelet-> {l} [$codelet][30] != 0)
      && ($Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$codelet][30]] [14] [2] > 0)
      ) {

        $Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$codelet][30]] [14] [2] --;
        };#if
      &transmgr (undef(), $codelet, $Awfif::memes-> {snnh} {end}, $Awfif::memes-> {snnh} {indequiv});
# freecjhlsoiup3
      my ($sgdi, $gsponsor, $telni, $dcount, $dtelcount, $atelni, $ntelni, $transmgrid, $currentwsbi);

      $cwsbi = $Awfif::memes-> {currentwsbi};
      if (($Awfif::codelet-> {l} [$codelet][19] > 0)
      && ($Awfif::codelet-> {l} [$codelet][19] != $Awfif::codelet-> {l} [$codelet][20])
      ){

        $currentwsbi = $Awfif::codelet-> {l} [$codelet][19];
        }#if
      else {

        $currentwsbi = $Awfif::codelet-> {l} [$codelet][20];
        };#else
      $dcount = 0;
      $dtelcount = 0;
      if (($Awfif::codelet-> {l} [$codelet][37] > 0)
      ){

        $transmgrid = $Awfif::codelet-> {l} [$codelet][37];
        };
      $Awfif::codelet-> {l} [$codelet][32] = 0; #don't leave tfree floating in the free codelets
      if (($Awfif::codelet-> {l} [$codelet][30] != 0)
      && ($Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$codelet][30]] [14] [2] <= 0)
      && (($Awfif::memes-> {currentwsbi} = $currentwsbi) != 0)
# and this codelets sponsoring wso has group complete set
      && (fgrpd ($codelet, $Awfif::codelet-> {l} [$codelet][21], \$sgdi, $Awfif::memes->{snnh}{groupcategory}))
      && (($gsponsor = fgrpsponsor ($Awfif::codelet-> {l} [$codelet][21], $Awfif::workspace-> {l} [$sgdi] [3], $Awfif::memes-> {snnh} {groupcategory})) != 0)
      && (gcompleted ($gsponsor, $transmgrid))
      && (($telni = trwsoadr ($gsponsor, -1)) != 0)
      && (($ntelni = $telni) != 0)
# and is telomeric
      && (istelwso (\$ntelni, \$dcount, \$dtelcount))
# freectmu2
      && (!$transmgd)
      ) {
# write a destruction ok descriptor

        $atelni = awsoadr ($telni);
        $Awfif::wsol-> {l} [$atelni][2]
          = setupdesc ( $Awfif::memes-> {snnh} {destroyok},
              ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l} [$codelet] [30]),
              $Awfif::memes-> {snnh} {telomere},
              $Awfif::wsol-> {l} [$atelni][2],
              $atelni);
        };#if
      $Awfif::memes-> {currentwsbi} = $cwsbi;
      &countcdel ($codelet, $mode);# count the deletion
# get the current free head

      $tt = $Awfif::memes-> {codelett};
      $h = $Awfif::memes-> {codeleth};
      $f = $Awfif::memes-> {codeletf};
      &mactcodelettolist ($codelet, 't', $f);

      $tt = $Awfif::memes-> {codelett};
      $h = $Awfif::memes-> {codeleth};
      $f = $Awfif::memes-> {codeletf};
      };#can delete
    if ( (($Awfif::memes-> {codelett} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codelett}][0] == 0))
    && (($Awfif::memes-> {codelett} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codelett}][1] == 0))
    && ($Awfif::memes-> {codelett} != $Awfif::memes-> {codeleth})
    ){

      &break ();
      };# check for circular references
    if ( ($Awfif::codelet-> {t} [$codelet] != $Awfif::memes-> {snnh} {free})
    && (!defined ($Awfif::codelet-> {l} [$codelet] [2]))
    ){

      break ();
      }#if
    if (defined ($$rcantd)){

      $$rcantd = $cantd;
      };#if
    $Awfif::memes-> {listrelinking} = '';
    return $response
    }#freecodelet
#
#<!-- end tag ds -->
#<!-- start tag scc -->
#<!-- start tag aso -->
#
sub mactcodelettolist {
    my ($codelet, $tofree, $oldhead, $type) = @_;
    my ($pflink, $plink, $pt, $ph, $cstate);
#
# move an active codelet datastructure to another list - if old head is not free list then reply is the new head value
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr);
      $pr = $codelet;
      print ("mactcodelettolist codelet $pr ");
      $pr = $Awfif::codelet-> {l} [$codelet] [19];
      print ("ws($pr)");
      $pr = $Awfif::memes-> {snnih} {$Awfif::codelet-> {t} [$codelet]};
      print ("-$pr");
      $pr = $Awfif::memes-> {acodelets};
      print ("as($pr)");
      };
    $cstate = $Awfif::codelet-> {t} [$codelet];
    if ( (($Awfif::memes-> {codeletpt} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codeletpt}][0] == $Awfif::memes-> {codeletpt}))
    or (($Awfif::memes-> {codeletpt} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codeletpt}][1] == $Awfif::memes-> {codeletpt})) ) {

      &break ();
      };# check for circular references
    if ((defined ($Awfif::codelet-> {l} [0] [1]))
    ){

      &break ();
      };#if
# get the current free head

    $pflink = $oldhead;
    if ( ( (($tofree) or (!defined ($oldhead)) or (($oldhead == $Awfif::memes-> {codeletf}) && ($oldhead != 0))) && ($Awfif::codelet-> {t} [$codelet] == $Awfif::memes-> {snnh} {free}))
    or ( ((($oldhead == $Awfif::memes-> {codeletdef}) && ($oldhead != 0)) or ($type == $Awfif::memes-> {snnh} {deferred})) && ($Awfif::codelet-> {t} [$codelet] == $Awfif::memes-> {snnh} {deferred}))
    or ( ((($oldhead == $Awfif::memes-> {codeletw}) && ($oldhead != 0)) or ($type == $Awfif::memes-> {snnh} {wait})) && ($Awfif::codelet-> {t} [$codelet] == $Awfif::memes-> {snnh} {wait}))
    ){#don't move its already in the desired queue
      }#if
    elsif ($codelet != 0 ) {

      $pt = $Awfif::memes-> {codelett};
      $ph = $Awfif::memes-> {codeleth};

      if ( (($tofree) or (!defined ($oldhead)) or (($oldhead == $Awfif::memes-> {codeletf}) && ($oldhead != 0)) ) ){
        $Awfif::codelet-> {t} [$codelet] = $Awfif::memes-> {snnh} {free};
        }#if
      elsif ( ((($oldhead == $Awfif::memes-> {codeletdef}) && ($oldhead != 0)) or ($type == $Awfif::memes-> {snnh} {deferred})) ){
        $Awfif::codelet-> {t} [$codelet] = $Awfif::memes-> {snnh} {deferred};
        }#elsif
      elsif ( ((($oldhead == $Awfif::memes-> {codeletw}) && ($oldhead != 0)) or ($type == $Awfif::memes-> {snnh} {wait})) ){
        $Awfif::codelet-> {t} [$codelet] = $Awfif::memes-> {snnh} {wait};
        };#elsif
      if ($cstate == $Awfif::memes-> {snnh} {active}) {
        $Awfif::memes-> {acodelets}--;
        };#if
      if ($tofree) {
# can reclaim it to the inactive list

        $Awfif::memes-> {fcodelets}++;
        }#freeing codelet
      else {
# this is no longer directly active so better remove it from the active count

        $Awfif::memes-> {tcodeletmax}++;
        };#else
# link its neighbours together
      $plink = $Awfif::codelet-> {l} [$codelet][0];
      if (($plink != 0)
      && ($codelet == $pt)
      ){#tail but has tail link - corrupt

        &break ();
        };#if
      if ($plink != 0) {

        if ($Awfif::codelet-> {l} [$codelet][1] == 0) {
# This is a head sentinal relink head
# did check if the $oldhead == codeleth but that makes no sense

          if (($codelet == $Awfif::memes-> {codeleth})
          && ($tofree)
          ){

            $Awfif::memes-> {codeleth} = $plink;
            };
          $Awfif::codelet-> {l} [$plink ][1] = 0;
          }
        else {# normal case - not either sentinal

          $Awfif::codelet-> {l} [$plink ][1] =
            $Awfif::codelet-> {l} [$codelet][1];
          $Awfif::codelet-> {l} [$Awfif::codelet-> {l} [$codelet][1] ][0] =
            $Awfif::codelet-> {l} [$codelet][0];
          };
        }#if
      else {
# this is a tail sentinal

        if ($Awfif::codelet-> {l} [$codelet][1] == 0) {
# This is a head sentinal as well relink head
# did check if the $oldhead == codeleth but that makes no sense

          if (($codelet == $Awfif::memes-> {codeleth})
          && ($tofree)
          ){

            $Awfif::memes-> {codeleth} = $plink;
            };#if
          }#if
        else {# just tail sentinal
# did check if the $oldhead == codeleth but that makes no sense

          if (($codelet == $pt)
          && ($tofree)
          ){

            $Awfif::memes-> {codelett} = $Awfif::codelet-> {l} [$codelet][1];
            };#if
          $Awfif::codelet-> {l} [$Awfif::codelet-> {l} [$codelet][1] ][0] = 0;
          };#else
        };#else
# relink this to become the head of the inactive list
      if ($tofree) {

        $Awfif::codelet-> {l} [$codelet] [1] = 0; #sentinal
        $Awfif::codelet-> {l} [$codelet] [0] = $pflink;
        if ($pflink != 0) {

          $Awfif::codelet-> {l} [$pflink][1] = $codelet;
          };# if
        $Awfif::codelet-> {l} [$codelet] [2] = 0;
        $Awfif::codelet-> {l} [$codelet] [3] = 0;
        $Awfif::memes-> {codeletf} = $codelet;
        }#if
      else {

        $Awfif::codelet-> {l} [$codelet] [1] = 0; #sentinal
        $Awfif::codelet-> {l} [$codelet] [0] = $oldhead;
        if ($oldhead != 0) {

          $Awfif::codelet-> {l} [$oldhead][1] = $codelet;
          };# if
        };#else
      };# ok to relink

    if (($codelet == $Awfif::memes-> {codeleth})
    && ($codelet == $Awfif::memes-> {codelett})
    ){

      &break ();
      };#if
    if ((defined ($Awfif::codelet-> {l} [0] [1]))
    ){

      &break ();
      };#if
    if ( (($codelet > 0) && ($Awfif::codelet-> {l} [$codelet][0] == $codelet))
    or (($codelet > 0) && ($Awfif::codelet-> {l} [$Awfif::codelet-> {l} [$codelet][1] ][1] == $codelet)) ) {

      &break ();
      };# check for circular references
    if ( (($Awfif::memes-> {codeletpt} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codeletpt}][0] == $Awfif::memes-> {codeletpt}))
    or (($Awfif::memes-> {codeletpt} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codeletpt}][1] == $Awfif::memes-> {codeletpt})) ) {

      &break ();
      };# check for circular references
    if ( (($Awfif::memes-> {codelett} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codelett}][0] == 0))
    && (($Awfif::memes-> {codelett} > 0) && ($Awfif::codelet-> {l} [$Awfif::memes-> {codelett}][1] == 0))
    && ($Awfif::memes-> {codelett} != $Awfif::memes-> {codeleth})
    ){

      &break ();
      };# check for circular references
    if ( ($Awfif::codelet-> {t} [$codelet] != $Awfif::memes-> {snnh} {free})
    && (!defined ($Awfif::codelet-> {l} [$codelet] [2]))
    ){

      break ();
      }#if
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      my ($pr);
      print ("mactcodelettolistx ");
      $pr = $Awfif::memes-> {acodelets};
      print ("as($pr) ret($codelet)\n");
      };
    return $codelet
    }#mactcodelettolist
#
#<!-- end tag vbt -->
#<!-- end tag uts -->
#<!-- start tag phe -->
#<!-- start tag vbt -->
#
sub setupdesc {
    my ($ltype, $to, $from, $dlinkh, $awso, $synccod) = @_;# must be the workspace head's index for this descriptor list or 0

# create an active descriptor
#
# checked for merged workspaces
    my ($ndlinkh);
# setupdescuf

    $Awfif::wsolfbs [$awso] [23 - $Awfif::memes-> {flagsoffset}] = 2;
    $Awfif::wsolfbs [$awso] [24 - $Awfif::memes-> {flagsoffset}] = 2;
    if (($Awfif::wsolfbs [$awso] [25 - $Awfif::memes-> {flagsoffset}]) != 3) {

      $Awfif::wsolfbs [$awso] [25 - $Awfif::memes-> {flagsoffset}] = 2;
      };
    $Awfif::wsolfbs [$awso] [27 - $Awfif::memes-> {flagsoffset}] = 2;
    $Awfif::wsolfbs [$awso] [28 - $Awfif::memes-> {flagsoffset}] = 2;
    $ndlinkh = addhli ($dlinkh, \$Awfif::workspace);
# setup the links data
    $Awfif::workspace-> {l} [$ndlinkh][2] = $to;
    $Awfif::workspace-> {l} [$ndlinkh][3] = $ltype;
    $Awfif::workspace-> {l} [$ndlinkh][4] = $from;
# setupdsyncu1
    &isetupsync ($ltype, $to, $from, $awso, $synccod);
# setupdsyncu2
# setupdsyncu3
# setupd34u2
# setupdsyncu4
## inverted in isetupsync
    return $ndlinkh
    }# setupdesc
#
sub isetupsync {
    my ($ltype, $to, $from, $awso, $synccod) = @_;# must be the workspace head's index for this descriptor list or 0

    if ((defined ($synccod))
    && ($synccod)
    && ((defined ($Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}])) && ($Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}] > 0))
    ) {
# isetupdsyncu2

      my ($linki, $found);
      $found = 0;
      $linki = $Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}];

      while (($found == 0) && ($linki != 0)) {
        if (($Awfif::syncl-> {l} [$linki] [2] == $to)
        && ($Awfif::syncl-> {l} [$linki] [3] == $ltype)
        && ($Awfif::syncl-> {l} [$linki] [4] == $from)
        ){

          $found = $linki;
          };#if
        $linki = $Awfif::syncl-> {l} [$linki] [0];
        };#while
# isetupdsyncu3
# Move codelet's from the sublist associated with the specific descriptor to the active list.
      if ($found != 0) {

        $linki = $Awfif::syncl-> {l} [$found] [5];# index of synccodl element
# isetupd34u2

        &ilwaiting ($linki, 't', \$Awfif::syncl-> {l} [$found] [5], \$Awfif::syncl-> {l} [$found] [6]);#
# isetupdsyncu4
## inverted in ilwaiting
        };#if
      };#if
    }# isetupsync
#
#<!-- end tag vbt -->
#<!-- end tag phe -->
#<!-- end tag ds -->
#
sub isetupdescc {
    my ($awso) = @_;# must be the workspace head's index for this descriptor list or 0

# set the wso cache for addition of an active descriptor

    &setwsbf ($awso, 23, 2);
    &setwsbf ($awso, 24, 2);
# isetupdescu253
    if (checkwsbf ( $awso, 25) != 3) {
      &setwsbf ($awso, 25, 2);
      };#if
    &setwsbf ($awso, 27, 2);
    &setwsbf ($awso, 28, 2);
    }# isetupdescc
#
#<!-- start tag phe -->
#
sub waitondesc {
    my ($myli, $awso, $desc2, $desc3, $desc4, $iprocname, $kwp, $kwpr, $sactset, $codeletdef, $actref) = @_;# must be the workspace head's index for this descriptor list or 0
    my ($trace, $nlinki);

    $trace = $Awfif::memes-> {trace};
    $Awfif::memes-> {trace} = 0;
# process request for synchronization with a description event
# submitcodelet the caller, into a deferred codelet queue,
# waitondesciqu1

    &queinhordef ($myli, $iprocname, $kwp, $kwpr, \@$sactset, \$$codeletdef);

    if ((defined ($Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}])) && ($Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}] > 0)) {
      my ($linki, $found);
      $found = '';
      $linki = $Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}];
      while ((!$found) && ($linki != 0)) {
        if (($Awfif::syncl-> {l} [$linki] [2] == $desc2)
        && ($Awfif::syncl-> {l} [$linki] [3] == $desc3)
        && ($Awfif::syncl-> {l} [$linki] [4] == $desc4)
        ){
          $found = 't';
# The codelet would be added to this list as the head of a sublist associated with the specific descriptor.

          $Awfif::syncl-> {l} [$linki] [5] = ($nlinki = addli (\$Awfif::synccodl, \$Awfif::syncl-> {l} [$linki] [5], \$Awfif::syncl-> {l} [$linki] [6]));
          if (($$codeletdef != $Awfif::memes-> {codeletdef}) && ($$codeletdef != 0)) {#the submitted codelet has been moved to its own queue

            $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [2] = $$codeletdef;
            if (defined ($actref)){

              $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [3] = $actref;
              };#if
            }#if
          elsif (($$codeletdef == $Awfif::memes-> {codeletdef})) {#still have to move the codelet to its own queue

            if (!defined ($Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [2])) {

              $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [2] = 0;
              };#if
            $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [2] = ($$codeletdef = mdefhcodelettolist ($Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [2]));
            if (defined ($actref)){

              $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$linki] [5]] [3] = $actref;
              };#if
            };#else
          };
        $linki = $Awfif::syncl-> {l} [$linki] [0];
        };#while
      if (!$found) {#new descriptor list to be setup

        $Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}] = addli (\$Awfif::syncl, \$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}], \$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosynclt}]);
        $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [2] = $desc2;
        $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [3] = $desc3;
        $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [4] = $desc4;
        $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5] = 0; #Each descriptor should have its own list of codelets with a unique head
        $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [6] = 0; #Each descriptor should have its own list of codelets with a unique tail
# The codelet would be added to this list as the head of a sublist associated with the specific descriptor.

        $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5] = ($nlinki = addli (\$Awfif::synccodl, \$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5], \$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [6]));
        if (($$codeletdef != $Awfif::memes-> {codeletdef}) && ($$codeletdef != 0)) {#the submitted codelet has been moved to its own queue

          $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2] = $$codeletdef;
          if (defined ($actref)){

            $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [3] = $actref;
            };#if
          }#if
        elsif (($$codeletdef == $Awfif::memes-> {codeletdef})) {#still have to move the codelet to its own queue

          if (!defined ($Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2])) {

            $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2] = 0;
            };#if
          $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2] = ($$codeletdef = mdefhcodelettolist ($Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2]));
          if (defined ($actref)){

            $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [3] = $actref;
            };#if
          };#else
        };#if
      }#if
    else {

      $Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}] = 0;
      $Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosynclt}] = 0;
      $Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}] = addli (\$Awfif::syncl, \$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}], \$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosynclt}]);
      $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [2] = $desc2;
      $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [3] = $desc3;
      $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [4] = $desc4;
      $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5] = 0; #Each descriptor should have its own list of codelets with a unique head
      $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [6] = 0; #Each descriptor should have its own list of codelets with a unique tail
# The codelet would be added to this list as the head of a sublist associated with the specific descriptor.

      $Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5] = ($nlinki = addli ( \$Awfif::synccodl, \$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5], \$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [6]));
      if (!defined ($Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2])) {

        $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2] = 0;
        };#if
      if (($$codeletdef != $Awfif::memes-> {codeletdef}) && ($$codeletdef != 0)) {#the submitted codelet has been moved to its own queue

        $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2] = $$codeletdef;
        if (defined ($actref)){

          $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [3] = $actref;
          };#if
        }#if
      elsif (($$codeletdef == $Awfif::memes-> {codeletdef})) {#still have to move the codelet to its own queue

        $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2] = ($$codeletdef = mdefhcodelettolist ($Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [2]));
        if (defined ($actref)){

          $Awfif::synccodl-> {l} [$Awfif::syncl-> {l} [$Awfif::wsol-> {l} [$awso] [$Awfif::memes-> {wsosyncl}]] [5]] [3] = $actref;
          };#if
        };#else
      };#else
    if ( ( ($$codeletdef > 0)
    && ($Awfif::codelet-> {t} [$$codeletdef] != $Awfif::memes-> {snnh} {free})
    && (!defined ($Awfif::codelet-> {l} [$$codeletdef] [2])) )
    ){

      break ();
      }#if

    $Awfif::memes-> {trace} = $trace;
    return ($nlinki)
    }# waitondesc
#
#<!-- end tag vbt -->
#
sub waitonstrancomp {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#
    my ($trace, $nlinki, $stran, $subp11i, $cdef);

    $trace = $Awfif::memes-> {trace};
    $Awfif::memes-> {trace} = 0;
# process request for synchronization with a sub transaction complete event
# submitcodelet the caller, into a deferred codelet queue,

    &queinhordef ($myli, undef(), $kwp, $kwpr, \@$sactset, \$cdef);
    if (($cdef != 0) && ($cdef == $Awfif::memes-> {codeletdef})) {#the submitted codelet has not been moved to its own queue yet

# find the sub transaction - its the tral entry referred in the subpl [11] set that has the requester referenced in the tral->{i} data structure
      $subp11i = findsubpicnm ($myli, $Awfif::codelet-> {l} [$myli] [36], $Awfif::codelet-> {l} [$myli] [2]);
      $stran = $Awfif::subpl-> {l} [$Awfif::codelet-> {l} [$myli][36]] [11] [$subp11i];
# waitonstrancomh
# and get the head entry at the required tral identifying a synchronization list.
# its in the 0 item of the $Awfif::tral-> {w} if its present

      if ( (defined ($Awfif::tral-> {w} [$stran] [0]))
      && ($Awfif::tral-> {w} [$stran] [0] > 0)
      ){#already got a sync head setup
# The codelet would be added to this list as the head of a sublist associated with the specific descriptor.

        $Awfif::tral-> {w} [$stran] [0] = ($nlinki = addli (\$Awfif::synccodl, \$Awfif::tral-> {w} [$stran] [0], \$Awfif::tral-> {wt} [$stran] [0]));
        $Awfif::synccodl-> {l} [$nlinki] [2] = mdefhcodelettolist ($Awfif::synccodl-> {l} [$nlinki] [2]);
        }#if
      else {#setup a new sync head for the request

# The codelet would be added to this list as the head of a sublist associated with the specific descriptor.

        $Awfif::tral-> {w} [$stran] [0] = 0;
        $Awfif::tral-> {wt} [$stran] [0] = 0;
        $Awfif::tral-> {w} [$stran] [0] = ($nlinki = addli (\$Awfif::synccodl, \$Awfif::tral-> {w} [$stran] [0], \$Awfif::tral-> {wt} [$stran] [0]));
        $Awfif::synccodl-> {l} [$nlinki] [2] = mdefhcodelettolist (0);
        };#else
      };#if

    $Awfif::memes-> {trace} = $trace;
    return ($nlinki)
    }# waitonstrancomp
#
#<!-- end tag ds -->
#<!-- start tag vbt -->
#
sub queinhordef {
    my ($myli, $iprocname, $kwp, $kwpr, $sactset, $codeletdef) = @_;#
    my ($trace, $procname, $submiticodelet);

    $trace = $Awfif::memes-> {trace};
    $Awfif::memes-> {trace} = 0;
# process request for synchronization with a sub transaction complete event
# submitcodelet the caller, into a deferred codelet queue,

    $submiticodelet = '';
    $Awfif::clp = ();
    if ((defined ($iprocname)) ) {

      $submiticodelet = 't';
      }#if
    $procname = setupprocname ($myli, $iprocname);
    $$codeletdef = $Awfif::memes-> {codeletdef};
    if ($submiticodelet) {
# this codelet is going in the deferred queue. It is not active but won't age out until moved back to the active queue

      &loadclp ($myli, \$Awfif::clp, \@{$Awfif::inhibl-> {clpa}}, $Awfif::codelet-> {l} [$myli] [24]);
      $Awfif::clp-> {inhib}-> {ilinkp} = $Awfif::codelet-> {l} [$myli] [24];
      $Awfif::clp-> {urgency} = ($Awfif::clp-> {urgency} * $Awfif::memes-> {ilaunchm});
      $Awfif::clp-> {strategy} = $procname;
      &groupsinv1 ($myli, undef(), undef(), undef(), undef(),undef(), $procname, $kwp, $kwpr, $sactset, 't');
# when the codelet is made active it won't age out and will be raised in priority until it runs
      if ($$codeletdef != $Awfif::memes-> {codeletdef}) {

        if (!defined ($Awfif::inhibl-> {l} [$Awfif::codelet-> {l} [$myli] [24]] [3])) {

          $Awfif::inhibl-> {l} [$Awfif::codelet-> {l} [$myli] [24]] [3] = 0;
          };#if
        $Awfif::inhibl-> {l} [$Awfif::codelet-> {l} [$myli] [24]] [3] = ($$codeletdef = mdefhcodelettolist ($Awfif::inhibl-> {l} [$Awfif::codelet-> {l} [$myli] [24]] [3]));
        $Awfif::inhibl-> {l} [$Awfif::codelet-> {l} [$myli] [24]] [4] = $procname;
        }#if
      else {

        $$codeletdef = 0;
        };#else
      }#if
    else {

      $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
      $Awfif::clp-> {urgency} = $Awfif::codelet-> {l} [$myli][3];
      $Awfif::clp-> {strategy} = $procname;
      $Awfif::clp-> {action}-> {sponsor} = $Awfif::codelet-> {l} [$myli][17];
      $Awfif::clp-> {action}-> {signal} = $Awfif::codelet-> {l} [$myli][16];
      $Awfif::clp-> {action}-> {schema} = $Awfif::codelet-> {l} [$myli][18];
      $Awfif::clp-> {action}-> {ref} = $Awfif::codelet-> {l} [$myli][4];
      $Awfif::clp-> {action}-> {sws} = $Awfif::codelet-> {l} [$myli] [20];
      $Awfif::clp-> {action}-> {wss} = $Awfif::codelet-> {l} [$myli][21];
      $Awfif::clp-> {action}-> {wse} = $Awfif::codelet-> {l} [$myli][22];
      &groupsinv1 ($myli, undef(), undef(), undef(), undef(),undef(), $procname, $kwp, $kwpr, $sactset, 't');
      if ($$codeletdef != $Awfif::memes-> {codeletdef}) {

        $$codeletdef = $Awfif::memes-> {codeletdef};
        }#if
      else {

        $$codeletdef = 0;
        };#else
      };#else
    if ( ( ($$codeletdef > 0)
    && ($Awfif::codelet-> {t} [$$codeletdef] != $Awfif::memes-> {snnh} {free})
    && (!defined ($Awfif::codelet-> {l} [$$codeletdef] [2])) )
    or ( ($Awfif::memes-> {codeletdef} > 0)
    && ($Awfif::codelet-> {t} [$Awfif::memes-> {codeletdef}] != $Awfif::memes-> {snnh} {free})
    && (!defined ($Awfif::codelet-> {l} [$Awfif::memes-> {codeletdef}] [2])) )
    ){

      break ();
      }#if

    $Awfif::memes-> {trace} = $trace;
    }# queinhordef
#
#<!-- end tag vbt -->
#<!-- start tag sia -->
#<!-- start tag ds -resweb -->
#
sub notwaitonelkd {
    my ($myli, $sponsor, $grkwp, $grkwpr, $sactset) = @_;# start index into synccodl list of codelets all waiting on this event
    my ($dontwait, $cwsbi, $atelhwso, $asponsor, $stwso, $astwso);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("notwaitonelkd sponsor($sponsor) ");
      };
    $cwsbi = $Awfif::memes-> {currentwsbi};
    $dontwait = 't';
    $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$myli] [20];
    $atelhwso = awsoadr (trwsoadr ($sponsor,-1));
    $asponsor = awsoadr ($sponsor);
# Find the statement wso and obtain the statement's wso type
    $stwso = igetmynowner ($myli, $sponsor, 'bustatement', $grkwp, $grkwpr);
    $astwso = awsoadr ($stwso);

    my ($bcount, $cws, $bcwso, $abcwso, $sldesc, $reportdesc, $areportwso, $sigcount, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge);
    $bcount = ifindb ($myli, $stwso, 'binderc', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $grkwp, $grkwpr, \@$sactset);
    $bcwso = getfbws ($myli, $sigcount, \@lomatchs, \@lola, \$cws);
    $Awfif::memes-> {currentwsbi} = $cws;
    $abcwso = awsoadr ($bcwso);
# find the transcription factor binding
    if ($bcount == 1) {

      if ( ( ($sldesc = findtdesc ($Awfif::wsol-> {l} [($abcwso)] [2], $Awfif::memes-> {snnh} {wsposition})) != 0 )
      && (($reportdesc = findtdesc ($Awfif::wsol-> {l} [($abcwso)] [2], $Awfif::memes-> {snnh} {initiate})) != 0 )
      ){

        $Awfif::memes-> {currentwsbi} = ($Awfif::workspace-> {l} [$reportdesc] [3] - $Awfif::memes-> {snnh} {wsi});
        $areportwso = awsoadr (($Awfif::workspace-> {l} [$reportdesc] [2] - $Awfif::memes-> {snnh} {wsi}));
# if end list kw has not reached end of list then if not issued waitondesc do so
        if ((findtdesc ($Awfif::wsol-> {l} [$areportwso][2], $Awfif::memes-> {snnh} {model}, $Awfif::memes-> {snnh} {found}, ($Awfif::memes-> {snnh} {endlistkwevaluator} + $Awfif::memes-> {snnh} {wsi})) == 0)
        && ($Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36] ] == 0)
        ){#wait

          my ($bcindex);
          &waitondesc ($myli, $areportwso, ($Awfif::memes-> {snnh} {endlistkwevaluator} + $Awfif::memes-> {snnh} {wsi}), $Awfif::memes-> {snnh} {found}, $Awfif::memes-> {snnh} {model}, undef(), undef(), undef(), undef(), \$Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]]);
          $Awfif::codelet-> {l} [ $Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]] ] [35] = $Awfif::codelet-> {l} [$myli] [35];
          $Awfif::codelet-> {l} [ $Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]] ] [36] = $Awfif::codelet-> {l} [$myli] [36];
          $Awfif::codelet-> {l} [ $Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]] ] [37] = $Awfif::codelet-> {l} [$myli] [37];
          $Awfif::subpl-> {q} [2] [0]++;#stops amplifier inhibition while positive
          $dontwait = '';
# notwaitbcu1
          $bcindex = matchbreakcodelet ($myli);
          if (($bcindex > 0) #handle break codelet
          && (matchbreakcodelet ($Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]]) == 0) #not already in list
          ){

            $Awfif::memes-> {breakcodelet} [$bcindex] = $Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]];
            }#if
          elsif ($bcindex > 0){#just remove the myli reference from the break datastructure

            &remarrent ($bcindex, \@{$Awfif::memes-> {breakcodelet}});
            if ($Awfif::codelet-> {l} [$myli] [36] > 0){#remove subprogram reference

              &remarrent ($bcindex, \@{$Awfif::memes-> {breaksubp}});
              };#if
            };#elsif
          }#if
        elsif ((findtdesc ($Awfif::wsol-> {l} [$areportwso][2], $Awfif::memes-> {snnh} {model}, $Awfif::memes-> {snnh} {found}, ($Awfif::memes-> {snnh} {endlistkwevaluator} + $Awfif::memes-> {snnh} {wsi})) == 0)
        && ($Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36] ] != 0)
        ){#wait

          $dontwait = '';
          my ($bcindex);
          $bcindex = matchbreakcodelet ($myli);
          if (($bcindex > 0) #handle break codelet
          && (matchbreakcodelet ($Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]]) == 0) #not already in list
          ){

            $Awfif::memes-> {breakcodelet} [$bcindex] = $Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36]];
            }#if
          elsif ($bcindex > 0){#just remove the myli reference from the break datastructure

            &remarrent ($bcindex, \@{$Awfif::memes-> {breakcodelet}});
            if ($Awfif::codelet-> {l} [$myli] [36] > 0){#remove subprogram reference

              &remarrent ($bcindex, \@{$Awfif::memes-> {breaksubp}});
              };#if
            };#elsif
          }#elsif
        elsif ((findtdesc ($Awfif::wsol-> {l} [$areportwso][2], $Awfif::memes-> {snnh} {model}, $Awfif::memes-> {snnh} {found}, ($Awfif::memes-> {snnh} {endlistkwevaluator} + $Awfif::memes-> {snnh} {wsi})) != 0)
        && ($Awfif::subpl-> {q} [2][$Awfif::codelet-> {l} [$myli] [36] ] != 0)
        ){#wait

          $Awfif::subpl-> {q} [2] [$Awfif::codelet-> {l} [$myli] [36] ] = undef ();
          $Awfif::subpl-> {q} [2] [0]--;
          };#elsif
        };#if
      };#if
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("notwaitonelkdx ret($dontwait) ");
      };
    return $dontwait;
    }# notwaitonelkd
#
#<!-- end tag ds -->
#<!-- end tag sia -->
#<!-- start tag vbt -->
#
sub ilwaiting {
    my ($ilinki, $set34, $head, $tail) = @_;# start index into synccodl list of codelets all waiting on this event
    my ($plinki,$linki);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ilwaiting ilinki($ilinki) ");
      };
    $linki = $ilinki;#modifiable local copy
    while ($linki != 0) {
# move the codelet to the active queue

      my ($linkp, $oh, $olp0, $olp1);
      $linkp = $Awfif::synccodl-> {l} [$linki][2];#the codelet id
# ilwaitactu1
      if (($Awfif::wfcdefl-> {hash} {$linkp} > 0)
      && (defined ($Awfif::synccodl-> {l} [$linki][3]))
      ){

        ${$Awfif::synccodl-> {l} [$linki][3]} = 't';
        };#if
      $oh = $Awfif::memes-> {codeleth};
      if ($oh != 0) {

        $Awfif::codelet-> {l} [$oh] [1] = $linkp;
        };#if
      $olp0 = $Awfif::codelet-> {l} [$linkp] [0];
      $olp1 = $Awfif::codelet-> {l} [$linkp] [1];
      $Awfif::codelet-> {l} [$linkp] [0] = $oh;
      $Awfif::codelet-> {l} [$linkp] [1] = 0;
      if ($Awfif::codelet-> {t} [$linkp] != $Awfif::memes-> {snnh} {active} ){

        $Awfif::codelet-> {t} [$linkp] = $Awfif::memes-> {snnh} {active};
        $Awfif::memes-> {acodelets} ++;
        if ($Awfif::memes-> {acodelets} > $Awfif::memes-> {tcodelets} ){ &break ();};
        };#if
      if ($set34) {

        $Awfif::codelet-> {l} [$linkp] [34] = 1;
        };
      $Awfif::memes-> {codeleth} = $linkp;
      if (($Awfif::memes-> {codeletdef} == $linkp)) {

        if ($olp0 != 0) {

          $Awfif::codelet-> {l} [$olp0] [1] = 0;
          };#if
        $Awfif::memes-> {codeletdef} = $olp0;
        }#if
      else {

        if ($olp0 != 0) {

          $Awfif::codelet-> {l} [$olp0] [1] = $olp1;
          };#if
        if ($olp1 != 0) {

          $Awfif::codelet-> {l} [$olp1] [0] = $olp0;
          };#if
        }# else
# report if new active head is circular

      if (($Awfif::codelet-> {l} [$linkp] [0] == $Awfif::codelet-> {l} [$linkp] [1]) && ($linkp != $Awfif::memes-> {codelett})) { &break ();};
# and delete the synccodl entry

      $plinki = $linki;
      $linki = $Awfif::synccodl-> {l} [$linki] [0];
      &freeli ($plinki, \$Awfif::synccodl, \$$head, \$$tail);
      $Awfif::synccodl-> {l} [$plinki] [2] = 0;#remove the codelet index
      $Awfif::synccodl-> {l} [$plinki] [3] = ();#remove the activated pointer if set
      };#while
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ilwaitingx ret($linki) ");
      };
    return $linki;
    }# ilwaiting
#
#<!-- end tag vbt -->
#<!-- end tag phe -->
#
sub setupprocname {
    my ($myli, $iprocname) = @_;#
    my ($trace, $procname);

    $trace = $Awfif::memes-> {trace};
    $Awfif::memes-> {trace} = 0;

    if ((defined ($iprocname)) ) {

      $procname = $iprocname;
      }#if
    elsif ((defined ($Awfif::codelet-> {l} [$myli] [27]) )
    && ($Awfif::codelet-> {l} [$myli] [27] =~ /evaluator/i)
    ){

      $procname = $Awfif::codelet-> {l} [$myli] [27];
      }#elsif
    else {

      $procname = $Awfif::codelet-> {l} [$myli] [2];
      };

    $Awfif::memes-> {trace} = $trace;
    return $procname
    }# setupprocname
#
sub setupbuildername {
    my ($procname) = @_;#
    my ($trace, $buildername, $f1);

    $trace = $Awfif::memes-> {trace};
    $Awfif::memes-> {trace} = 0;

    if ($procname =~ /^(.+)*evaluator/i) {
      $f1 = $1;
      if ($f1 ne '') {

        $buildername = $f1 . 'builder';
        }#if
      else {

        $buildername = $procname;
        };#else
      }#if
    else {

        $buildername = $procname;
      };#else

    $Awfif::memes-> {trace} = $trace;
    return $buildername
    }# setupbuildername
#
#
#
sub e2ftfevaluator1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
# cyclins operate a Shewhart cycle in the eucaryotic cell. The e2ftf codelet is a transcription factor regulating the expression of cyclin genes

    &icsevaluator1 ($myli, \&Awfif::ie2ftfevaluator1, 'e2ftfbuilder', $kwp, $kwpr, \@$sactset);
    }# e2ftfevaluator1
#
sub ie2ftfevaluator1 {
    my ($myli, $sponsor, $signal, $schema, $swstype, $kwp, $kwpr, $sactset, $noswstype, $fbinderc) = @_;#bsmodeler requires the ignored parameters for its general interface
    my ($dolaunch, $bcount, $pdcawso, $pws, $stwso, $astwso, $twso, $asponsor, $cwsbi,
    $grkwp, $grkwpr);
#
# cyclins operate a Shewhart cycle in the eucaryotic cell. The e2ftf codelet is a transcription factor regulating the expression of cyclin genes
# checked for merged workspaces

    $dolaunch = '';
    $cwsbi = $Awfif::memes-> {currentwsbi};
    $twso = trwsoadr (fgrpend ($sponsor), 1);
    $asponsor = awsoadr ($sponsor);

    $stwso = getmystatement ($myli, $sponsor, $grkwp, $grkwpr);
    $astwso = awsoadr ($stwso);
    my ($sigcount, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge, $e2fwso);
    $$fbinderc = ifindb ($myli, $stwso, 'pdcab', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $kwp, $kwpr, \@$sactset);
    $pdcawso = getfbws ($myli, $sigcount, \@lomatchs, \@lola, \$pws);

# find the inhibitor binding
    if ($$fbinderc == 1) {

      $bcount = ifindb ($myli, $stwso, 'e2finhibb', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $kwp, $kwpr, \@$sactset, $pws);
      $e2fwso = getstsbws ($myli, $sigcount, \@lomatchs, \@lola, $pws);
      if (($bcount == 1) #call in the builder
      ){#launch builder
        $dolaunch = 't';
        };#if
      };#if
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ie2ftfevaluatorx ret ($dolaunch)\n");
      };
    return $dolaunch
    }# ie2ftfevaluator1
#
sub e2ftfbsmodeler1 {
    my ($myli, $kwp, $kwpr, $sactset, $and) = @_;
    my ($salience);
# cyclins operate a Shewhart cycle in the eucaryotic cell. The e2ftf codelet is a transcription factor regulating the expression of cyclin genes

    $salience = ievalbsmodeler1 ($myli, \$$kwp, $kwpr, \@$sactset, \$$and, 'ie2ftfevaluator');
    $$and = 't';
    return $salience
    }# e2ftfbsmodeler1
#
sub e2ftfbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($sponsor, $signal, $schema, $found, $bcount, $swstype, $noswstype, $cwsbi, $bcexists, $pdcawso, $pws, $iwso, $counteri, $tfwso,
    $grkwp, $grkwpr, $cdn, $cdnx);
#
# cyclins operate a Shewhart cycle in the eucaryotic cell. The e2ftf codelet is a transcription factor regulating the expression of cyclin genes
# checked for merged workspaces

# look for assert binder's workspace

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $found = '';
    $bcount = 0;
    $noswstype = 't';
    $bcexists = '';

# now check the workspace for salient workspace type with model status descriptor
    if (getcontext ($myli, \$sponsor, \$signal, \$schema, \$swstype, \$grkwp, \$grkwpr, $noswstype, \$cdn, \$cdnx, 3)) {
      my ($stwso, $astwso);

# Find the statement wso and obtain the statement's wso type
      $stwso = igetmynowner ($myli, $sponsor, 'bustatement', $grkwp, $grkwpr);
      $astwso = awsoadr ($stwso);

      my ($sigcount, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge);
      $bcount = ifindb ($myli, $stwso, 'pdcab', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $$kwp, $kwpr, \@$sactset);
      $pdcawso = getfbws ($myli, $sigcount, \@lomatchs, \@lola, \$pws);
# find the inhibitor binding
      if ($bcount == 1) {

        my ($aiwso);
        $bcount = ifindb ($myli, $stwso, 'e2finhibb', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $$kwp, $kwpr, \@$sactset, $pws);
        $iwso = getstsbws ($myli, $sigcount, \@lomatchs, \@lola, $pws);
        $Awfif::memes-> {currentwsbi} = $pws;
        $aiwso = awsoadr ($iwso);
        if ( ($bcount == 1)
        && ((findcounter ($Awfif::wsol-> {l} [$aiwso][2], ($Awfif::memes-> {snnh} {inhibition}), \$counteri, $Awfif::memes-> {snnh} {prbevaluator})))
        && ((!findcounter ($Awfif::wsol-> {l} [$aiwso][2], ($Awfif::memes-> {snnh} {pdcaprogram}), \$counteri, $Awfif::memes-> {snnh} {ecyclin})))
        && ((!findcounter ($Awfif::wsol-> {l} [$aiwso][2], ($Awfif::memes-> {snnh} {pdcaprogram}), \$counteri, $Awfif::memes-> {snnh} {bcyclin})))
        ){#found descriptor

          $bcount = ifindb ($myli, $stwso, 'tfactorb', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $$kwp, $kwpr, \@$sactset, $pws);
          $tfwso = getstsbws ($myli, $sigcount, \@lomatchs, \@lola, $pws);
          if ($bcount == 1) {#write prediction

            my ($atfwso);
            $Awfif::memes-> {currentwsbi} = $pws;
            $atfwso = awsoadr ($tfwso);
            if ( ((!findcounter ($Awfif::wsol-> {l} [$atfwso][2], ($Awfif::memes-> {snnh} {tfactor}), \$counteri, $Awfif::memes-> {snnh} {e2fevaluator}, $Awfif::memes-> {snnh} {complete})))
              ){

              $Awfif::wsol-> {l} [$atfwso][2]
              = inccounter ( $Awfif::memes-> {snnh} {complete},
                  ($Awfif::memes-> {snnh} {wsi} + $Awfif::memes-> {snnh} {e2ftfevaluator}), #lets start with one
                  $Awfif::memes-> {snnh} {tfactor},
                  $Awfif::wsol-> {l} [$atfwso] [2],
                  $atfwso,
                  't',#this descriptor will launch waiting codelets
                  $Awfif::memes-> {snnh} {complete},
                  ($Awfif::memes-> {snnh} {e2ftfevaluator})
                  );
              };#if
            };#if
          };#if
        };#if
      };#got target wso

    $Awfif::memes-> {currentwsbi} = $cwsbi;
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# e2ftfbuilder1
#
# -------------- ---------------------- inhibitors ------------------ -----------------
# inhibitors share the codelet interface from the coderack that is valid when they are called
# but they expect to be called directly rather than queuing for the coderack and return a status
#
sub iinhibitor1 {# inverted function used by competitive inhibitors
    my ($myli, $noinhibition, $ilinkp, $strategy) = @_;
    my ($cdn, $cdnx);
#
# checked for merged workspaces

    $cdn = clogstat (\$cdnx);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdn noinhibition ($noinhibition) ilinkp $ilinkp strategy $strategy ");
      };
# if inhibition then schedule self
    if (!$noinhibition) {

      &loadclp ($myli, \$Awfif::clp, \@{$Awfif::inhibl-> {clpa}}, $ilinkp);
      $Awfif::clp-> {inhib}-> {ilinkp} = $ilinkp;
      $Awfif::clp-> {strategy} = $strategy;
      $Awfif::clp-> {urgency} = $Awfif::memes-> {buscu};# don't hog coderack if deleted will be rerun at lb priority
      &cdsubmitcodelet ($myli, \$Awfif::clp);
# and record codelet id in inhibl
      $Awfif::inhibl-> {l} [$ilinkp] [3] = $Awfif::memes->{codeleth};
      $Awfif::inhibl-> {l} [$ilinkp] [4] = $strategy;
      }
# else if last inhibitor in chain submit the inhibited codelet
    elsif ($Awfif::inhibl-> {l} [$ilinkp] [0] == 0) {

      &loadclp ($myli, \$Awfif::clp, \@{$Awfif::inhibl-> {clpa}}, $ilinkp);
      $Awfif::clp-> {urgency} = ($Awfif::clp-> {urgency} * $Awfif::memes-> {ilaunchm});
      &cdsubmitcodelet ($myli, \$Awfif::clp);
      if($Awfif::codelet-> {l} [$myli] [18] > 0) {#activate the schema

        &setinhib ($Awfif::codelet-> {l} [$myli][18], 0);
        &actnodes ($Awfif::codelet-> {l} [$myli][18], $Awfif::memes-> {openatype},($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
        };#if
      $Awfif::inhibl-> {clpa} [ $ilinkp] = ();
      };# else

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# iinhibitor1
#
sub ilbinhibitor1 {
    my ($myli, $kwp, $kwpr, $sactset, $strategy) = @_;
    my ($noinhibition, $ilinkp, $i, $ai, $isstatement, $signal, $schema, $sponsor, $paramb, $dontwait,
    $grkwp, $grkwpr, $cdn, $cdnx);
#
# checked for merged workspaces

    $cdn = igetcontext ($myli, \$cdnx, \$sponsor, \$signal, \$schema, \$grkwp, \$grkwpr, 3, 't');
    $noinhibition = 't';
    $paramb = 6;
    $ilinkp = $Awfif::codelet-> {l} [$myli] [24];
# clean up inhibl since now running
    $Awfif::inhibl-> {l} [$ilinkp] [3] = ();
    $Awfif::inhibl-> {l} [$ilinkp] [4] = ();
# assess if inhibition should be occuring
    $isstatement = '';
    $dontwait = '';
    $i = $grkwpr;
    while (($i != 0)
    && ($i != $grkwp)
    && (($noinhibition) && (!$isstatement))) {#a & b == 1
# see if this is a part

      $ai = awsoadr ($i);
      my($linki);
      $isstatement = '';
      $linki = $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::memes-> {snnh} {statementcategory}] ;#the head attribute
      while (($linki != 0) && (!($isstatement))) {
        if (($Awfif::slipnet-> {l} [$linki] [2] == (wsbasetype ($i)))
        && ($Awfif::slipnet-> {l} [$linki] [3] == $Awfif::memes-> {snnh} {cinstance})
        && ($Awfif::slipnet-> {l} [$linki] [4] == $Awfif::memes-> {snnh} {statementcategory})
        && ((isterminated ($i, $grkwp, $grkwpr)) > 0)
        ){

          $isstatement = 't';# reward for same bonds in proximity
          };#if
        $linki = $Awfif::slipnet-> {l} [$linki] [0];
        };#while

      if ($isstatement) {
# see how many descriptors must be matched
# check where the last defined parameter is

        my ($founddefined, $desccount, $parami, $descid);
        $founddefined = 't';
        $parami = 2;
        $desccount = 0;
        while ($founddefined) {
          if (defined ($_[$paramb + $parami])) {

            if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
              my ($pr);
              $pr = $Awfif::memes-> {snnih} {$_[$paramb + $parami -2]};
              print ("($parami:$_[$paramb+$parami-2]($pr)) ");
              $pr = $Awfif::memes-> {snnih} {$_[$paramb + $parami -1]};
              print ("($parami:$_[$paramb+$parami-1]($pr)) ");
              $pr = $Awfif::memes-> {snnih} {$_[$paramb + $parami]};
              print ("parami($parami:$_[$paramb+$parami]($pr)) ");
              };#if
            $parami = $parami + 3;
            $desccount++;
            }#if
          else {

            if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
              print ("desccount($desccount) ");
              };#if
            $founddefined = '';
            };#else
          };#while

        for ($parami = 0; (($noinhibition) && ($parami < ($desccount * 3))); $parami = $parami + 3) {
          $descid = 0;
          if ((($_[$paramb + $parami]) == $Awfif::memes-> {snnh} {any})
          && (($_[$paramb + $parami+1]) == $Awfif::memes-> {snnh} {any})
          &&(($descid = findtdesc ($Awfif::wsol-> {l} [ $ai ] [2], $_[$paramb + $parami + 2])) == 0 )
          ) {

            $noinhibition = '';
            }#if
          elsif ((($_[$paramb + $parami]) == $Awfif::memes-> {snnh} {any})
          && (($_[$paramb + $parami+1]) != $Awfif::memes-> {snnh} {any})
          && ($descid == 0)
          &&(($descid = findtdesc ($Awfif::wsol-> {l} [ $ai] [2], $_[$paramb + $parami + 2], $_[$paramb + $parami + 1])) == 0 )
          ) {

            $noinhibition = '';
            }#elsif
          elsif ( ($descid == 0)
          && (!findbond ($Awfif::wsol-> {l} [ $ai] [2], $_[$paramb + $parami ], $_[$paramb + $parami + 1], $_[$paramb + $parami + 2]))
            ) {

            $noinhibition = '';
            }#elsif
          else {

            $noinhibition = 't';
            };#else
          };#for
        for ($parami = 0; (($parami < ($desccount * 3))); $parami = $parami + 3) {

          if ((defined ($_[$paramb -1]))
          && ($parami == (($_[$paramb -1] - 1) * 3))
          && (findbond ($Awfif::wsol-> {l} [ $ai] [2], $_[$paramb + $parami ], $_[$paramb + $parami + 1], $_[$paramb + $parami + 2]))
          ) {

            $dontwait = 't';
            };#if
          };#for

        };#if
      $i = trwsoadr ($i, 1);#get the next wso
      };# for -> while
# if inhibition then schedule self
    if ((defined ($_[$paramb -1])) && (!$noinhibition) && (!$dontwait)) {

      my ($codeletdef);
      &waitondesc ($myli, $ai, ($_[$paramb + (($_[$paramb -1] -1) * 3) ] + $Awfif::memes-> {snnh} {wsi}), $_[$paramb + (($_[$paramb -1] -1) * 3) + 1 ], $_[$paramb + (($_[$paramb -1] -1) * 3) + 2], $strategy, \$$kwp, $kwpr, $sactset, \$codeletdef);
      }#if
    else {

      &iinhibitor1 ($myli, $noinhibition, $ilinkp, $strategy);
      };#else

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx ret ($noinhibition)\n");
      };
    &clogstatx ();
    return $noinhibition
    }# ilbinhibitor1
#<!-- end tag aso -->
#<!-- start tag stm -->
#
sub lbinhibitor1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($noinhibition);

    $noinhibition = ilbinhibitor1 ($myli, \$$kwp, $kwpr, $sactset, 'lbinhibitor', 1, $Awfif::memes-> {snnh} {valid}, $Awfif::memes-> {snnh} {statementcategory}, $Awfif::memes-> {snnh} {model});

    return $noinhibition
    }# lbinhibitor1
#
#<!-- end tag stm -->
#
sub devinhibitor1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;
    my ($noinhibition);

    $noinhibition = ilbinhibitor1 ($myli, \$$kwp, $kwpr, $sactset, 'devinhibitor', 2, $Awfif::memes-> {snnh} {any}, $Awfif::memes-> {snnh} {any}, $Awfif::memes-> {snnh} {stream}, $Awfif::memes-> {snnh} {valid}, $Awfif::memes-> {snnh} {statementcategory}, $Awfif::memes-> {snnh} {model});

    return $noinhibition
    }# devinhibitor1
#
#<!-- end tag cr -->
#<!-- start tag aso -->
#
sub msiopinhibitor1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($noinhibition);

    $noinhibition = ilbinhibitor1 ($myli, \$$kwp, $kwpr, $sactset, 'msiopinhibitor', 1, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {unbind}, $Awfif::memes-> {snnh} {model});

    return $noinhibition
    }# msiopinhibitor1
#
#<!-- end tag aso -->
#<!-- start tag vbt -->
#
sub vbtdevinhibitor1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;
    my ($noinhibition);
# vbtdev codelet is inhibited by this uncompetetive inhibitor, until the test sentence has been accepted by the part and statement codelets

    $noinhibition = ilbinhibitor1 ($myli, \$$kwp, $kwpr, $sactset, 'vbtdevinhibitor', 1, $Awfif::memes-> {snnh} {valid}, $Awfif::memes-> {snnh} {statementcategory}, $Awfif::memes-> {snnh} {model});

    return $noinhibition
    }# vbtdevinhibitor1
#
sub vbtiopinhibitor1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($noinhibition);

    $noinhibition = ilbinhibitor1 ($myli, \$$kwp, $kwpr, $sactset, 'vbtiopinhibitor', 1, $Awfif::memes-> {snnh} {development}, $Awfif::memes-> {snnh} {unbind}, $Awfif::memes-> {snnh} {model});

    return $noinhibition
    }# vbtiopinhibitor1
#
#<!-- start tag sia -->
#
sub groupsinv1 {
    my ($myli, $ni, $pi, $nidl, $sponsor, $model, $strategy, $kwp, $kwpr, $sactset, $deferred, $ignore0wsoname, $usepooling, $addbreak, $hiurg) = @_;
    my ($newli, $ctail, $psponsori, $usedpooling);
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("groupsinv1 myli $myli ni $ni pi $pi sponsor $sponsor model $model strategy $strategy ");
      if ((defined ($kwp)) && (defined ($kwpr)) && (defined ($$sactset[0]))) {
        print ("kwp $kwp kwpr $kwpr sactset $$sactset[0] ");
        };
      if ((defined ($deferred))) {
        print ("deferred $deferred ");
        };
      if ((defined ($ignore0wsoname))) {
        print ("ignore0wsoname $ignore0wsoname ");
        };
      if ((defined ($usepooling))) {
        print ("usepooling $usepooling ");
        };
      if ((defined ($addbreak))) {
        print ("addbreak $addbreak ");
        };
      if ((defined ($hiurg))) {
        print ("hiurg($hiurg) ");
        };
      };

    $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
    if (!defined($Awfif::clp-> {urgency})) {

      if ($Awfif::codelet-> {l} [$myli][3] != 0) {

        if ((defined ($hiurg))
        && ($hiurg)
        ){

          $Awfif::clp-> {urgency} = $Awfif::codelet-> {l} [$myli][3] * $Awfif::memes-> {gerhiamp};
          }#if
        else {

          $Awfif::clp-> {urgency} = $Awfif::codelet-> {l} [$myli][3] * $Awfif::memes-> {geramp};
          };#else
        }
      else {

        $Awfif::clp-> {urgency} = $Awfif::memes-> {tdgsurg};
        };#else
      };

    if (defined ($Awfif::clp-> {wsi})) {

      }#use this
    elsif ($Awfif::codelet-> {l}[$myli][19] != 0) {

      $Awfif::clp-> {wsi} = $Awfif::codelet-> {l}[$myli][19];
      }#wsi set
    else {

      $Awfif::clp-> {wsi} = $Awfif::memes-> {currentwsbi};
      };
    if (($Awfif::codelet-> {l}[$myli][25] != 0)
    or ((defined($ignore0wsoname)) && ($ignore0wsoname))
    ){

      if (!defined ($Awfif::clp-> {action}-> {wsoname})
      && ($Awfif::codelet-> {l}[$myli][25] != 0)
      ) {

        $Awfif::clp-> {action}-> {wsoname} = $Awfif::codelet-> {l}[$myli][25];
        };#if
      if ((!defined ($Awfif::clp-> {action}-> {sws})) && ($Awfif::codelet-> {l}[$myli] [20] != 0)) {

        $Awfif::clp-> {action}-> {sws} = $Awfif::codelet-> {l}[$myli] [20];
        };#if
      if ((!defined ($Awfif::clp-> {action}-> {wss})) && ($Awfif::codelet-> {l}[$myli][21] != 0)) {

        $Awfif::clp-> {action}-> {wss} = $Awfif::codelet-> {l}[$myli][21];
        };#if
      };#wsoname set
    if ($Awfif::codelet-> {l}[$myli][23] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {jhlabeli})) {

        $Awfif::clp-> {action}-> {jhlabeli} = $Awfif::codelet-> {l}[$myli][23];
        };#if
      };#jhlabeli set
    if ($Awfif::codelet-> {l}[$myli][30] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {jhlabeloi})) {

        $Awfif::clp-> {action}-> {jhlabeloi} = $Awfif::codelet-> {l}[$myli][30];
        };#if
      };#jhlabeloi set
# groupsinvieu1
    if ($Awfif::codelet-> {l}[$myli][31] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {sgjhlsi})) {

        $Awfif::clp-> {action}-> {sgjhlsi} = $Awfif::codelet-> {l}[$myli][31];
        };#if
      };#sgjhlsi set
# groupsinvtiu1
    if ($Awfif::codelet-> {l}[$myli][32] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {tfree})) {

        $Awfif::clp-> {action}-> {tfree} = $Awfif::codelet-> {l}[$myli][32];
        };#if
      };#tfree set
# groupsinvtidu1
    if ($Awfif::codelet-> {l}[$myli][35] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {transid})) {

        $Awfif::clp-> {action}-> {transid} = $Awfif::codelet-> {l}[$myli][35];
        };#if
      };#transid set
# groupsinvupoolu1
    if (($Awfif::codelet-> {l}[$myli][38] != 0)
    or ((defined ($Awfif::clp-> {action}-> {usepooling}))
      && ($Awfif::clp-> {action}-> {usepooling} > 0))
    ){

      $usedpooling = 't';
      };#transid set
# groupsinvsubpiu1
    if ($Awfif::codelet-> {l}[$myli][36] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {subpi})) {

        $Awfif::clp-> {action}-> {subpi} = $Awfif::codelet-> {l}[$myli][36];
        };#if
      };#subpi set
# groupsinvtmgriu1
    if ($Awfif::codelet-> {l}[$myli][37] != 0) {

      if (!defined ($Awfif::clp-> {action}-> {transmgrid})) {

        $Awfif::clp-> {action}-> {transmgrid} = $Awfif::codelet-> {l}[$myli][37];
        };#if
      if ($Awfif::codelet-> {l} [$myli] [2] =~ /evaluator/i) {

        $Awfif::tmassl-> {submitted} [$Awfif::codelet-> {l}[$myli][37]] = $Awfif::codelet-> {l}[$myli][2];
        };#if
      };#transmgrid set
    $Awfif::clp-> {strategy} = "$strategy";
    if (defined ($ni)) {

      $Awfif::clp-> {bond}-> {ni} = $ni;
      };#if
    if (defined ($nidl)) {

      $Awfif::clp-> {bond}-> {nidl} = $nidl;
      };#if
    if (defined ($pi)) {

      $Awfif::clp-> {bond}-> {pi} = $pi;
      };#if
    if (defined ($model)) {

      $Awfif::clp-> {group}-> {model} = $model;
      };#if

    if ($sponsor ne '') {

      $Awfif::clp-> {group}-> {sponsor} = $sponsor;
      &updatelog ($myli,'gs',8, $Awfif::clp-> {group}-> {sponsor});
      };#if
# groupsinvpoolu1

    $newli = cdsubmitcodelet ($myli, \$Awfif::clp, $deferred, $addbreak);
    &updatelog ($myli,'gs',9, $Awfif::memes-> {codeleth});
    if ( (((defined ($usepooling)) && ($usepooling)) or ((defined ($usedpooling)) && ($usedpooling)) ) && (($ctail = poolctail ($myli, $Awfif::codelet-> {l} [$myli] [36], \$psponsori)) > 0) && ($Awfif::codelet-> {l} [$ctail] [38] > 0) ){

      $Awfif::subpl-> {q} [3] [$psponsori] [$Awfif::codelet-> {l} [$myli] [36]] = addpoolc ($newli, $Awfif::subpl-> {q} [3] [$psponsori] [$Awfif::codelet-> {l} [$myli] [36]]);
      };#if

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("groupsinv1x ret $newli\n");
      };
    return $newli
    }# groupsinv1
#
#<!-- end tag sia -->
#<!-- start tag uts -->
#<!-- start tag sia -->
#<!-- start tag gc -->
#
sub groupbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#codelet launch architecture requires the ignored parameters for its general interface
    my ($grouppresent, $from, $to, $target, $sponsor, $gtype, $model, $as, $ae,
      $wsoindisle, $wsoindisue, $hle, $hue, $dontactivate, $dontdeploy, $iedesc, $jhlsi, $transmgrid, $bcindex, $patelhwso,
      $signal, $schema, $swstype,#dummies for inverted proc get context
      $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat, $gbiest, $gbieet, $gbost, $gboet,
      $grkwp, $grkwpr, $cdn, $cdnx);
#
# create a group if the situation allows - and action appropriate schematic phenomena

    if (getcontext ($myli, \$sponsor, \$signal, \$schema, \$swstype, \$grkwp, \$grkwpr, 't', \$cdn, \$cdnx, 3)) {#proceed
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      if (greaterwso ($Awfif::codelet-> {l}[$myli][7], $Awfif::codelet-> {l}[$myli][4])) {
        &itwsoutput ( trwsoadr ($Awfif::codelet-> {l}[$myli][7], 1), $Awfif::codelet-> {l}[$myli][4]);
        }
      else {
        &itwsoutput ( trwsoadr ($Awfif::codelet-> {l}[$myli][4], 1), $Awfif::codelet-> {l}[$myli][7]);
        };
      };
    if ($Awfif::memes-> {trace} == $Awfif::memes-> {tracehrtime}) {
      use Time::HiRes 'time';
      ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat) = localtime(time);
      };
    if (($model == $Awfif::memes-> {snnh} {indequiv})
    && (gcompleted ($from, $Awfif::codelet-> {l} [$myli] [37]))
    ) { # no point to do anything
      }
    else {
# groupbuilderwgcu1
# use the wontgroup cache

    $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{stop};
    if ( (defined ($Awfif::memes-> {grpbsp21break}))
    && ($Awfif::memes-> {grpbsp21break} == $Awfif::codelet-> {l} [$myli] [21])
    ){

      &break();
      };#if
    $hue = '';
    $grouppresent = "";
    $dontactivate = '';
    $dontdeploy = '';
    &csetuplog ($myli, 'gb', $Awfif::codelet-> {l} [$myli][4], $Awfif::codelet-> {l} [$myli][7]);
    &updatelog ($myli,'gb',1, $Awfif::codelet-> {l} [$myli][13]);
# it will fight any incompatible structures. And
# if it wins, it will
# destroy all incompatible structures,
# build the new group descriptor and

    $from = $Awfif::codelet-> {l} [$myli][4];
    $to = $Awfif::codelet-> {l} [$myli][7];
    $model = $Awfif::codelet-> {l} [$myli][16];
# update codelets sponsor info
    if ($model == $Awfif::memes->{groupsponsor}) { # this should be got from the slipnet

      $gtype = bndsgroup ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]);
      }# group sponsor
    elsif (($model == $Awfif::memes-> {snnh} {indequiv})
    && (!gcompleted ($from, $Awfif::codelet-> {l} [$myli] [37]))
    ) { # this should be got from the slipnet

      $gtype = bndsgroup ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]);
      }# ie telomere
    else {

      my ($sgdi, $sbind);
      $gtype = $Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3];
      &fsgrpd ($myli, $sponsor, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind );# has the sponsor moved?
      if ($sponsor != ($Awfif::workspace-> {l}[$sgdi][2] - $Awfif::memes-> {snnh}{wsi})) {#migrate the sponsor
        $sponsor = ($Awfif::workspace-> {l}[$sgdi][2] - $Awfif::memes-> {snnh}{wsi});
        $Awfif::codelet-> {l}[$myli][17] = $sponsor;
        };
      };
# groupbuilderiecu1
# see if can use indequiv cache

    if ( ( ($iedesc = findtdesc ($Awfif::wsol-> {l} [ awsoadr ($sponsor)] [2], $Awfif::memes-> {snnh} {indequiv})) != 0 )
    && ( ($jhlsi = ($Awfif::workspace-> {l} [$iedesc] [2] - $Awfif::memes-> {snnh} {wsi})) != 0 )
    && ($Awfif::jhls-> {l} [$jhlsi] [15][1])
    ){
# groupbuildersgju3
      my ($miedesc);
      $miedesc = findtdesc ($Awfif::wsol-> {l} [ awsoadr (trwsoadr ($sponsor, -1))] [2], $Awfif::memes-> {snnh} {mindequiv});
# groupbuildertrau3
# check for transid

      $gbiest = time ();
      $Awfif::memes-> {gbiec}++;# groupbuilder ie entry counter
      my ($i, $sigcount, $a17, $ai, $transid, $atelhwso, $subpid, $ltransmgrid);
      my (@lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge);

      if ($Awfif::codelet-> {l} [$myli] [35] > 0) {

        $transid = $Awfif::codelet-> {l} [$myli] [35];
        };#if
# groupbuildertramgru1
# see if get a transid and subpid from the transmgr

      if ($Awfif::codelet-> {l} [$myli] [37] > 0) {

        $transmgrid = $Awfif::codelet-> {l} [$myli] [37];
        };#if
      if ($Awfif::codelet-> {l} [$myli] [36] > 0) {

        $subpid = $Awfif::codelet-> {l} [$myli] [36];
        };#if
      $atelhwso = awsoadr ( trwsoadr($sponsor,-1));
      if ((defined($atelhwso)) && (($bcindex = matchbreakthawso ($atelhwso, $subpid)) > 0)
      ){

        &break ();
        };#if
# initiate group complete action
      $Awfif::memes-> {fatp}++;
# send activation to all the groups descriptor's Slipnet nodes

      $as = $Awfif::jhls-> {l}[$jhlsi][16][0];
      $ae = $Awfif::jhls-> {l}[$jhlsi][16][1];
      $i = $as;
      while (($i != trwsoadr ($ae, 1)) && ( ($ai = awsoadr ($i)) != 0)) {
        &actobj ($i, ($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]), ampdesc ($myli, $sponsor));
        &setusalcwsocache ($ai, undef(), (($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}]| $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}])), undef());
        $i = trwsoadr ($i, 1);
        };#activate group's new object descriptors
      $hle = '';
      $hue = '';
# mark group as complete
# groupcgsicu1

      $a17 = awsoadr ($Awfif::codelet-> {l}[$myli][17]);#group sponsor
      $patelhwso = awsoadr (trwsoadr ($Awfif::codelet-> {l}[$myli][17],-1));
      if ((defined ($transmgrid)) && ($transmgrid != 0) && (defined ($subpid)) && ($subpid > 0)) {

        $ltransmgrid = $transmgrid;#should pass in undef unless the transmgr is associated with a subprogram
        };#if
      $Awfif::wsol-> {l} [$a17][2]
        = inccounter ( $gtype,
          ($Awfif::memes-> {snnh} {wsi} + trwsoadr ($as, 1)), #must point to start
          $Awfif::memes-> {snnh} {groupstart},
          $Awfif::wsol-> {l} [$a17][2],
          $a17,
          undef (),
          undef (),
          undef (),
          $ltransmgrid,
          $patelhwso,
          -1);#indicate if setting a transaction managed counter
# groupcgeicu1

      $Awfif::wsol-> {l} [$a17][2]
        = inccounter ( $gtype,
          ($Awfif::memes-> {snnh} {wsi} + trwsoadr ($ae, -1)), #must point to end
          $Awfif::memes-> {snnh} {groupend},
          $Awfif::wsol-> {l} [$a17][2],
          $a17,
          undef (),
          undef (),
          undef (),
          $ltransmgrid,
          $patelhwso,
          -1);#indicate if setting a transaction managed counter
# group completion invalidates group salience caches

      $i = trwsoadr ($as, 1);
      while (($i != $ae) && ( awsoadr ($i) != 0)) {
        &wsclinv (wsbasetype ($i), $Awfif::memes-> {currentwsbi}, ($Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {delta}]));
        &itwscachecor ('tdgroup', wsbasetype ($i), 'seq', 'groupbuilder1');
        $i = trwsoadr ($i, 1);
        };

      &setcache ('bugroup', 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}, (1 + $Awfif::memes-> {backoffactive} {'tdgroup'})) ;
# group completion increases energy
      $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} + $Awfif::memes-> {gatp};
# dname is activated in case it can now be deployed in the group
      &actnodes ($Awfif::memes-> {snnh} {dname}, $Awfif::memes-> {groupatype}, ($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
# apply the linking function of group completion
# groupbnsu1
      if (defined ($ltransmgrid)) {#indicate this is a subprogram

        $Awfif::wsol-> {l}[awsoadr ($sponsor)][ $Awfif::memes-> {wsosubpid}] = $subpid;#*** submacrok ***#
        }#if
      &gclab ($myli, $as, $ae, '', $sponsor);
      $sigcount = usebice ($Awfif::jhls-> {l} [$jhlsi] [16][2], \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge);
# if the groups labels result in a match with a signal then raise the signal
#

      if ($sigcount > 0) {
        my ($i2);
        for ($i = 0; $i < $sigcount; $i++) {
          if ($lomatchs[$i]) {#there is a link launch the action scout
# unless this is an operon
            if (($Awfif::jhls-> {l} [$lola[$i]][4] != $Awfif::memes-> {snnh}{operon}) && ($Awfif::jhls-> {l} [$lola[$i]][4] != $Awfif::memes-> {snnh}{stbinding}) && ($Awfif::jhls-> {l} [$lola[$i]][4] != $Awfif::memes-> {snnh}{subpstbinding})) {
              my ($asponsor, $counteri);
# groupbuildersubpu3

              if ($Awfif::memes-> {gcnfcsuse}) {&itcsuse ();};
              $Awfif::clp = ();
              $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
              $Awfif::clp-> {urgency} = ($Awfif::codelet-> {l} [$myli][3] * $Awfif::memes-> {evlaunchm});
# see if can reflect the amplification in the urgency

              if ( ((defined ($Awfif::memes-> {gburgampbreak})) )
              && ($Awfif::memes-> {gburgampbreak})
              && (ampdesc ($myli, $sponsor) > 1)
              ){

                &break();
                };#if
              $Awfif::clp-> {urgency} = ($Awfif::clp-> {urgency} * ampdesc ($myli, $sponsor));
              if ($Awfif::codelet-> {l}[$myli][19] != 0) {
                $Awfif::clp-> {wsi} = $Awfif::codelet-> {l}[$myli][19];
                }#wsi set
              else {
                $Awfif::clp-> {wsi} = $Awfif::memes-> {currentwsbi};
                };
# groupbuildertfu1
# apply cascadesponsorship

              $Awfif::clp-> {action}-> {tfree} = cascadesponsor ($myli, $sponsor, $Awfif::memes-> {snnh}{getcassponsor});
              $Awfif::clp-> {strategy} = "tgoalscout";
# groupbuilderdsu2
# apply delayselect

              if ( (findcounter ($Awfif::wsol-> {l} [$a17][2], $Awfif::memes-> {snnh} {delayselect}, \$counteri))
              && ($Awfif::workspace-> {l} [$counteri] [9] > ($Awfif::memes-> {snnh} {wsi} + 0))
              ){

                $Awfif::clp-> {delayselect} = ($Awfif::workspace-> {l} [$counteri] [9] - $Awfif::memes-> {snnh} {wsi}) * $Awfif::memes-> {waitamp};
                &resetcounter ($Awfif::memes-> {snnh}{delayselect}, $a17);
                &maskcounter ($Awfif::memes-> {snnh}{delayselect}, $a17);
                };#if
              $Awfif::clp-> {action}-> {sponsor} = $sponsor;
              $Awfif::clp-> {action}-> {signal} = findsignal ($loconcs[$i]);
              $Awfif::clp-> {action}-> {schema} = $loconcs[$i];
              $Awfif::clp-> {action}-> {sws} = $Awfif::memes->{currentwsbi};
              $Awfif::clp-> {action}-> {wss} = $lostrts[$i];
              $Awfif::clp-> {action}-> {wsoname} = getwsoname ($lostrts[$i]);
              $Awfif::clp-> {action}-> {wse} = $loends[$i];
              $Awfif::clp-> {action}-> {jhlabeli} = $lola[$i];
              $Awfif::clp-> {action}-> {jhlabeloi} = gettjhlsoi (($asponsor = awsoadr($sponsor)), $Awfif::wsol-> {l}[$asponsor][ $Awfif::memes-> {wsogcjhlsi}]);#*** submacrok ***#
# groupbuildersgju1
              if ($miedesc > 0){

                my ($sgjhlsi);
                $sgjhlsi = ($Awfif::workspace-> {l} [$miedesc][2] - $Awfif::memes-> {snnh} {wsi});
                $Awfif::clp-> {action}-> {sgjhlsi} = $sgjhlsi;
                };#if
# groupbuildertrau4
              if (defined ($transid)) {

                $Awfif::clp-> {action}-> {transid} = $transid;
                };#if
# groupbuildersubpu4
              if (defined ($subpid)) {

                $Awfif::clp-> {action}-> {subpi} = $subpid;
                $Awfif::clp-> {urgency} *= $Awfif::memes-> {submult};
                };#if
              if (defined ($transmgrid)) {

                $Awfif::clp-> {action}-> {transmgrid} = $transmgrid;
                };#if
              &icdsubmitcodelet ($myli, \$Awfif::clp, $Awfif::jhls-> {l} [$lola[$i]] [10], $grkwp, $grkwpr, \@$sactset);
              if (($bcindex = matchbreakthawso (awsoadr( trwsoadr($sponsor, -1)), $subpid)) > 0) {

                &remarrent ($bcindex, \@{$Awfif::memes-> {breakthwso}});
                &remarrent ($bcindex, \@{$Awfif::memes-> {breakthsubp}});
                $Awfif::memes-> {breakcodelet} [ ++$Awfif::memes-> {breakcodelet} [0]] = $Awfif::memes-> {submitted};
                $Awfif::memes-> {breaksubp} [ ++$Awfif::memes-> {breaksubp} [0]] = $subpid;
                };#if
              &trackcodelet ($myli, $Awfif::memes-> {codeletdef}, $Awfif::memes-> {snnh} {group}, undef(), awsoadr( $sponsor), $Awfif::codelet-> {l} [$myli] [36]);
              &actnodes ( $Awfif::jhls-> {l} [$lola[$i2]][6], $Awfif::memes-> {openatype},($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
              &invcaches ($Awfif::jhls-> {l} [$lola[$i2]][6], $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'tdgroup'}]);
              }; #if its not an operon
            };#launch the action scout
          };#for
        };
# groupcompletemau2

      $gbieet = time ();
      $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {gbiesum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {gbiesum}] + $gbieet - $gbiest;
      }# use indequiv cache
    else {#proceed with groupbuilder
# groupbtimeu2

    $gbost = time ();
    $Awfif::memes-> {gboc}++;# groupbuilder other entry counter
# allocate target
    if (($Awfif::codelet-> {l} [$myli][16] == $Awfif::memes->{groupsponsor})
    or ($Awfif::codelet-> {l} [$myli][16] == $Awfif::memes-> {snnh} {indequiv})
    or ($Awfif::codelet-> {l} [$myli][16] < 0)
# this fix works for successor but probably not for pred or adj
# have to work out what really happens
    ) {#gs and add update ni

      $target = $from;
      }
    else {# member updates pi

      $target = $to;
      };
# also target the activation
    $as = $target;
    $ae = $target;
# first check whether the proposed group hasn't been built in the mean time.
# - check the descriptor list at ni to see if their is a descriptor
# for a group category of the required type and to the target
# may look odd but all group descriptors have the group sponsor in [2] which traces as pi in findbond
#

    $grouppresent = findbond ($Awfif::wsol-> {l} [ awsoadr ($target)] [2], $sponsor, $gtype, $Awfif::memes-> {snnh} {groupcategory});
    &updatelog ($myli,'gb',2, $grouppresent);
#
# groupbgcu1

    my ($astelhwso, $rtransmgrid, $stransmgrid, $ssubpid, $susetrans);

    if ($Awfif::codelet-> {l} [$myli] [37] > 0) {

      $rtransmgrid = $Awfif::codelet-> {l} [$myli] [37];
      };#if
    if ( ($Awfif::wsol-> {l} [($astelhwso = awsoadr ( trwsoadr($target,-1)))] [2] != 0)
    && ( (findtdesc ($Awfif::wsol-> {l} [ ($astelhwso)] [2], $Awfif::memes-> {snnh} {telomere})) != 0 )
    && ( (findtdesc ($Awfif::wsol-> {l} [ ($astelhwso)] [2], $Awfif::memes-> {snnh} {mindequiv})) != 0 )
    ){

      $susetrans = 0;
      $ssubpid = $Awfif::codelet-> {l} [$myli] [36];
      $stransmgrid = gettmgr ($myli, $astelhwso, $Awfif::memes-> {snnh} {stran}, \$susetrans, \$ssubpid);
      };#if
    if ((!($grouppresent)
      && (!gcompleted ($target, $stransmgrid)) #at this point still guessing where the atelhwso might be
      && (
        (!(wontgroup ($myli, $target, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset))
        or ((!($hue)) && (!$hle) && ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl} [wsbasetype ($target)] != 0))
      ))
      )
    or ((!gcompleted ($sponsor, $rtransmgrid))
      && (!gcompleted ($target, $stransmgrid)))
    ) {

      my ($sgdi, $dgdi, $sbind, $i, $pr);
# If not,
      $pr = $Awfif::memes-> {currentwsbi};
      print ("gc from=$pr:$from, to=$to, ptarget=$target ");
      &updatelog ($myli,'gb',3, $target);
# if will be deploying into an adjoining group then change that groups descriptors to this sponsor
      if ((($target == $to)
      && (fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
      && (fsgrpd ($myli, $from, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind )))

      or (($target == $from)
      && (fsgrpd ($myli, trwsoadr ($target,-1), \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
      && (fsgrpd ($myli, $target, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))
      && (fsgrpd ($myli, trwsoadr ($target,-1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind )))
        ) {# convert the sponsors to match this one

        &updatelog ($myli,'gb',4, $target);
        if (greatergwso ($target, $from)) {#look ascending
          $as = $target;
          do {

            $ae = $target;
            $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
            $target = trwsoadr ($target,1);
            }

          while ((fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
          && (fsgrpd ($myli, trwsoadr ($target,-1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))
          &&(!(wontgroup ($myli, $target, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hue))));

          if ($hue) {
            $dontdeploy = 't';
# groupbuilderwgcu2
            if (($Awfif::wontgroupc-> {caller} == $Awfif::memes-> {snnh}{stop}) or ($Awfif::wontgroupc-> {caller} == 0)) {
              $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
              };
            };
          if (((fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) && ($hue))
          && (fsgrpd ($myli, trwsoadr ($target,-1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))){

            $ae = $target;
            $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
            $target = trwsoadr ($target,1);
            }
          elsif ((!fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) #want to add a group so make sure target pointing correctly when -- aplied

            && (fsgrpd ($myli, trwsoadr ($target,-1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))) {
            $target = trwsoadr ($target,1);
            }
          elsif ((!fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) #this should have been stopped in the ge but .... lets ensure we don't deploy

            && (!fsgrpd ($myli, trwsoadr ($target,-1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))) {
            $dontdeploy = 't';
# groupbuilderwgcu3
            if (($Awfif::wontgroupc-> {caller} == $Awfif::memes-> {snnh}{stop}) or ($Awfif::wontgroupc-> {caller} == 0)) {
              $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
              };
            };

          $target = trwsoadr ($target,-1);
          }
        else {# potentially both ways
          $ae = $target;
          $as = trwsoadr ($target,-1);

          if (
            (fsgrpd ($myli, trwsoadr ($target,1), \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
          && (wontgroup ($myli, trwsoadr ($target,1), $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset))
          && ($hle)
            ) {

            $dontdeploy = 't';
# groupbuilderwgcu4
            if (($Awfif::wontgroupc-> {caller} == $Awfif::memes-> {snnh}{stop}) or ($Awfif::wontgroupc-> {caller} == 0)) {
              $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
              };
            }
          elsif (
            !fsgrpd ($myli, $target, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind )
            ) {# target does not have a bond

            $dontdeploy = 't';
# groupbuilderwgcu5
            if (($Awfif::wontgroupc-> {caller} == $Awfif::memes-> {snnh}{stop}) or ($Awfif::wontgroupc-> {caller} == 0)) {
              $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
              };
            }
          elsif (
            (fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) #if a group has appeared then don't want another one
            ) {# ni has been filled in so try and find a new target at the edge of the group
            do {

              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              $as = trwsoadr ($as,-1);
              }
            while ( (fsgrpd ($myli, $as, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
            && (fsgrpd ($myli, $as, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))
            && (!(wontgroup ($myli, $as, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hle))) );

            if (((fsgrpd ($myli, $as, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) && ($hle))
            && (fsgrpd ($myli, $as, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))) {

              $as = trwsoadr ($as,-1);
              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              };

            $as = trwsoadr ($as, 1);
            $ae = trwsoadr ($target, 1);
            $target = $as;
            if ( (
              (fsgrpd ($myli, trwsoadr ($target, 1), \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
            && (wontgroup ($myli, trwsoadr ($target, 1), $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset))
            && ($hle)
            )
            or (
              (fsgrpd ($myli, $target, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) #if a group has appeared then don't want another one
              )
              ) {
              $dontdeploy = 't';
# groupbuilderwgcu6
              if (($Awfif::wontgroupc-> {caller} == $Awfif::memes-> {snnh}{stop}) or ($Awfif::wontgroupc-> {caller} == 0)) {
                $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
                };
              };
            fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind );
            do {

              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              $ae = trwsoadr ($ae, 1);
              }
            while ((fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
            && (fsgrpd ($myli, trwsoadr ($ae, -1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))
            &&(!(wontgroup ($myli, $ae, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hue))));

            if (((fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) && ($hue))
            && (fsgrpd ($myli, trwsoadr ($ae, -1), \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))){

              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              $ae++;
              };

            $ae = trwsoadr ($ae, -1);
            print ("5.4.3 target=$target\n");
            }
          else {
            do {

              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              $as--;
              }
            while ( (fsgrpd ($myli, $as, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
            && (fsgrpd ($myli, $as, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))
            && (!(wontgroup ($myli, $as, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hle))) );

            if (((fsgrpd ($myli, $as, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) && ($hle))
            && (fsgrpd ($myli, $as, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))) {

              $as = trwsoadr ($as,-1);
              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              };

            $as = trwsoadr ($as, 1);
            $ae = trwsoadr ($target, 1);
            fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind );
            do {

              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              $ae++;
              }
            while ((fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
            && (fsgrpd ($myli, $ae-1, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))
            &&(!(wontgroup ($myli, $ae, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hue))));

            if (((fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind )) && ($hue))
            && (fsgrpd ($myli, $ae-1, \$dgdi, $Awfif::memes-> {snnh} {bondcategory}, grpsbond ($Awfif::workspace-> {l} [$Awfif::codelet-> {l}[$myli][5]][3]), \$sbind ))){

              $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
              $ae = trwsoadr ($ae, 1);
              };

            $ae = trwsoadr ($ae, -1);
            print ("8.4.3 target=$target\n");
            };
          };#ok to deploy upwards
        }#target is from
      elsif (($target == $to) && (wontgroup ($myli, $from, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)&& ($wsoindisue) && ($hue))) {#do no deployment but later check if reached both ends

        print ("no target\n");
        $dontactivate = 't';
        $dontdeploy = 't';
        if (($Awfif::wontgroupc-> {caller} == $Awfif::memes-> {snnh}{stop}) or ($Awfif::wontgroupc-> {caller} == 0)) {
          $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
          };
        &actnodes ($Awfif::memes->{snnh}{groupd}, $Awfif::memes-> {ntact},($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
        if (($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snna} {groupu} < $Awfif::memes-> {actth}) && ($Awfif::memes->{snw} [$Awfif::memes-> {currentwsbi}]-> {snna}{groupd} > $Awfif::memes-> {actth})) {
          &setinhib ($Awfif::memes-> {snnh} {groupd}, 0);#limit flip-flop
          $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnafm} {groupu} = $Awfif::memes-> {fatigue};
          &setinhib ($Awfif::memes-> {snnh} {groupu}, $Awfif::memes-> {fatigue});#limit flip-flop
          };
        }
      elsif (($target == $from) && (wontgroup ($myli, $to, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)&& ($wsoindisle) && ($hle))) {#do no deployment but later check if reached both ends

        $dontactivate = 't';
        &actnodes ($Awfif::memes->{snnh}{groupu}, $Awfif::memes-> {ntact},($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
        $dontdeploy = 't';
        $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
        if (($Awfif::memes->{snw} [$Awfif::memes-> {currentwsbi}]-> {snna}{groupd} < $Awfif::memes-> {actth}) && ($Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snna} {groupu} > $Awfif::memes-> {actth})) {
          &setinhib ($Awfif::memes-> {snnh} {groupu}, 0);#limit flip-flop
          $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnafm} {groupd} = $Awfif::memes-> {fatigue};
          &setinhib ($Awfif::memes-> {snnh} {groupd}, $Awfif::memes-> {fatigue});#limit flip-flop
          };
        print ("no target\n");
        }
      elsif (($target == $from)
        && (fsgrpd ($myli, $from, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
        ) {#do no deployment but later check if reached both ends

        $dontactivate = 't';
        $dontdeploy = 't';
        print ("no target\n");
        $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh}{start};
        }

      if (!($dontdeploy)) {
        my ($atarget);
        $atarget = awsoadr ($target);
        print ("9 target=$target\n");
        &setusalcwsocache ($atarget, undef(), (($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}])), undef());
        $Awfif::wsol-> {l} [ $atarget][2]
        = setupdesc ( $gtype,
            ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]), #must point to sponsor
            $Awfif::memes-> {snnh} {groupcategory},
            $Awfif::wsol-> {l} [$atarget][2],
            $atarget);
        &updatelog ($myli,'gb',7, $Awfif::wsol-> {l} [$atarget][2]);
        };

      &invcaches (wsbasetype ($target), ($Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'tdgroup'}] | $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'delta'}] ));
      &invcaches (wsbasetype ($from), ($Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'tdgroup'}] | $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'delta'}] ));
      &invcaches (wsbasetype ($to), ($Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'tdgroup'}] | $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'delta'}] ));
      if (!($dontactivate)) {
        $Awfif::memes-> {fatp}++;
# send activation to all the groups descriptor's Slipnet nodes

        $i = $as;
        while (($i != trwsoadr ($ae, 1)) && ( awsoadr ($i) != 0)) {
          &actobj ($i, ($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]), (ampdesc ($myli, $sponsor)));
          $i = trwsoadr ($i, 1);
          };#activate group's new object descriptors
        };

      $hle = '';
      $hue = '';
      $as = $Awfif::codelet-> {l}[$myli][17];
      $ae = $Awfif::codelet-> {l}[$myli][17];
      while ( (fsgrpd ($myli, $as, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
      && (!(wontgroup ($myli, $as, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hle))) ) {

        $as = trwsoadr ($as, -1);
        };
      if ($hle) {#as is expected to be beyond the group by 1
        $as = trwsoadr ($as, -1);
        }

      while ((fsgrpd ($myli, $ae, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind ))
      &&(!(wontgroup ($myli, $ae, $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset)) or (!($hue)))) {
        $ae = trwsoadr ($ae, 1);
        };
      if ($hue) {#ae is expected to be beyond the group by 1
        $ae = trwsoadr ($ae, 1);
        }
# align all the sponsors

      $i = trwsoadr ($as, 1);
      while (($i != $ae) && ($i != 0 ) && ( awsoadr ($i) != 0)) {

        &fsgrpd ($myli, $i, \$sgdi, $Awfif::memes-> {snnh} {groupcategory}, $gtype, \$sbind );
        $Awfif::workspace->{l}[$sgdi][2] = ($Awfif::memes-> {snnh} {wsi} + $Awfif::codelet-> {l}[$myli][17]);
        $i = trwsoadr ($i, 1);
        }
# if the group is now complete - i.e.its ends can't extend any further
# groupcomplete

      if ((wontgroup ($myli, trwsoadr ($as, 1), $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset) && ($wsoindisle) && ($hle))
      && (wontgroup ($myli, trwsoadr ($ae, -1), $gtype, \$wsoindisle, \$wsoindisue, \$hle, \$hue, $grkwp, $grkwpr, \@$sactset) && ($wsoindisue) && ($hue))) {
# initiate group complete action
        my ($i, $sigcount, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge, $a17, $use, $ai);
# see if to use delta or not
        if (findtdesc ($Awfif::wsol-> {l} [ awsoadr ($as) ][2], $Awfif::memes-> {snnh} {telomere}) != 0){#telomere so delta use

          $use = 1;
          }#if
        else {

          $use = 0;
          };
# mark group as complete

        $a17 = awsoadr ($Awfif::codelet-> {l}[$myli][17]);
        $patelhwso = awsoadr (trwsoadr ($Awfif::codelet-> {l}[$myli][17], -1));
        $Awfif::wsol-> {l} [$a17][2]
          = inccounter ( $gtype,
            ($Awfif::memes-> {snnh} {wsi} + trwsoadr ($as, 1)), #must point to start
            $Awfif::memes-> {snnh} {groupstart},
            $Awfif::wsol-> {l} [$a17][2],
            $a17);

        $Awfif::wsol-> {l} [$a17][2]
          = inccounter ( $gtype,
            ($Awfif::memes-> {snnh} {wsi} + trwsoadr ($ae, -1)), #must point to end
            $Awfif::memes-> {snnh} {groupend},
            $Awfif::wsol-> {l} [$a17][2],
            $a17);
# group completion invalidates group salience caches

        $i = trwsoadr ($as, 1);
        while (($i != $ae) && (($ai = awsoadr ($i)) != 0)) {
# gbwscup
          &setusalcwsocache ($ai, undef(), (($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}])), undef());
          &wsclinv (wsbasetype ($i), $Awfif::memes-> {currentwsbi},( $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'delta'}] ));
          &itwscachecor ('tdgroup', wsbasetype ($i), 'seq', 'groupbuilder1');
          $i = trwsoadr ($i, 1);
          };

        &setcache ('bugroup', 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}, $use + $Awfif::memes-> {backoffactive} {'tdgroup'}) ;
# group completion increases energy
        $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} + $Awfif::memes-> {gatp};
# dname is activated in case it can now be deployed in the group
        &actnodes ($Awfif::memes-> {snnh} {dname}, $Awfif::memes-> {groupatype}, ($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
# apply the linking function of group completion
        $sigcount = labinv1 ($myli, $as, $ae, '', $sponsor, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, 'notoporstbinding');
# if the groups labels result in a match with a signal then raise the signal
#

        if ($sigcount > 0) {
          my ($i2, $atti, $counteri);
          for ($i = 0; $i < $sigcount; $i++) {
            if ($lomatchs[$i]) {#there is a link launch the action scout
# unless this is an operon
              if (($Awfif::jhls-> {l} [$lola[$i]][4] != $Awfif::memes-> {snnh}{operon}) && ($Awfif::jhls-> {l} [$lola[$i]][4] != $Awfif::memes-> {snnh}{stbinding}) && ($Awfif::jhls-> {l} [$lola[$i]][4] != $Awfif::memes-> {snnh}{subpstbinding})) {
                my ($asponsor, $transid, $subpid, $teldesc);
# if this is the first group complete
                if ($Awfif::wsol-> {l}[($asponsor = awsoadr ($sponsor))][ $Awfif::memes-> {wsogcspjhlsi}] == 0) {#*** submacrok ***##this is a new group complete
                  my ($newjhlsi, $atelhwso);
# initialise the ws specific slipnet items

                  ©sn1 ($Awfif::memes-> {currentwsbi}, $Awfif::memes->{snnih}{$Awfif::jhls-> {l} [$lola[$i]] [6]});
# add a jhlabel for this workspace group
# groupbuilderiecu5

                  $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}] {snnl} [$Awfif::memes-> {snnh}{operon}] = newnlink ($Awfif::memes-> {snnh} {attrib}, ($newjhlsi = addjhlst ($Awfif::memes-> {snnh} {groupcategory}, $Awfif::memes-> {snnh} {operon}, 1, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}] {snnl}[$Awfif::memes-> {snnh}{operon}], $Awfif::jhls-> {l} [$lola[$i]] [6], $Awfif::memes-> {currentwsbi}, $lostrts[$i], $loends[$i], $Awfif::jhls-> {l} [$lola[$i]] [15] [0])), $Awfif::memes-> {snnh}{operon}, $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::memes-> {snnh}{operon}]);
# groupbuilderiecu6
# if this schemata has indequiv true check the telomeric head wso (logically sponsor - 1) for a mindeqiv descriptor
# if find one update that jhls with newly created jhls id

                  if (($Awfif::jhls-> {l} [$lola[$i]][15] [0])
                  && ($Awfif::wsol-> {l} [($atelhwso = awsoadr ( trwsoadr($sponsor,-1)))] [2] != 0)
                  && ( ($teldesc = findtdesc ($Awfif::wsol-> {l} [ ($atelhwso)] [2], $Awfif::memes-> {snnh} {mindequiv})) != 0 )
                  ){
                    $Awfif::jhls-> {l} [($Awfif::workspace-> {l} [$teldesc][2] - $Awfif::memes-> {snnh} {wsi})][15][2] = $newjhlsi;
# groupbuildertrau1
# if this schemata has indequiv true check the telomeric head wso (logically sponsor - 1) for a transid descriptor
# if find one remember to deploy a transid

                    if ($Awfif::codelet-> {l} [$myli] [35] > 0) {

                      $transid = $Awfif::codelet-> {l} [$myli] [35];
                      };#if
                    }; #if
# groupbuildertramgru2
# see if get a transid and subpid from the transmgr
                  if (defined ($atelhwso)) {


                    if ($Awfif::codelet-> {l} [$myli] [37] > 0) {

                      $transmgrid = $Awfif::codelet-> {l} [$myli] [37];
                      };#if
                    if ($Awfif::codelet-> {l} [$myli] [36] > 0) {

                      $subpid = $Awfif::codelet-> {l} [$myli] [36];
                      };#if
                    if ((defined($atelhwso)) && (($bcindex = matchbreakthawso ($atelhwso, $subpid)) > 0)
                    ){

                      &break ();
                      };#if
# groupbnsu2
                    if ((defined ($subpid)) && ($subpid > 0) ) {

                      $Awfif::wsol-> {l}[awsoadr ($sponsor)][ $Awfif::memes-> {wsosubpid}] = $subpid;#*** submacrok ***# cache a subpid for this subprogram schemata
                      };#if
# groupcgsicu2
                    if ((defined ($transmgrid)) && ($transmgrid != 0) && (defined ($subpid)) && ($subpid > 0)) {

                      $Awfif::wsol-> {l} [$a17][2]
                        = inccounter ( $gtype,
                        ($Awfif::memes-> {snnh} {wsi} + trwsoadr ($as, 1)), #must point to start
                        $Awfif::memes-> {snnh} {groupstart},
                        $Awfif::wsol-> {l} [$a17][2],
                        $a17,
                        undef (),
                        undef (),
                        undef (),
                        $transmgrid,
                        $patelhwso,
                        -1); #indicate if setting a transaction managed counter
# groupcgeicu2

                      $Awfif::wsol-> {l} [$a17][2]
                        = inccounter ( $gtype,
                        ($Awfif::memes-> {snnh} {wsi} + trwsoadr ($ae, -1)), #must point to end
                        $Awfif::memes-> {snnh} {groupend},
                        $Awfif::wsol-> {l} [$a17][2],
                        $a17,
                        undef (),
                        undef (),
                        undef (),
                        $transmgrid,
                        $patelhwso,
                        -1);#indicate if setting a transaction managed counter
                      };#if
                    };#if
# groupbuildersubpu1

# groupbuilderiecu3
# groupbuilderiecu2
                  if (writeiecok ($sponsor)
                  ){
# groupbuilderiecu4

                    $Awfif::jhls-> {l} [$newjhlsi][16][2] = addbice ($Awfif::memes-> {currentwsbi} , $as, $ae, $sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge);
                    $Awfif::jhls-> {l} [$newjhlsi][15][1] = 't';
                    $Awfif::jhls-> {l} [$newjhlsi][16][0] = $as;
                    $Awfif::jhls-> {l} [$newjhlsi][16][1] = $ae;
# if the new jhls is indeqiv then write a descriptor in the sponsor

                    $Awfif::wsol-> {l} [$asponsor][2]
                    = setupdesc ( $Awfif::memes-> {snnh} {zero},
                      ($newjhlsi + $Awfif::memes-> {snnh} {wsi}),
                      $Awfif::memes-> {snnh} {indequiv},
                      $Awfif::wsol-> {l} [$asponsor] [2],
                      $asponsor);
                    };#if
# $lola[$i] is the index of the jhls when $lomatchs[$i] is true so can copy over its attributes
                  $atti = $Awfif::jhls-> {l} [$lola[$i]] [5];
                  $atti = $Awfif::attribs-> {l} [$atti][1];#move past the start attribute
                  while (($Awfif::attribs-> {l} [$atti][2]) != $Awfif::memes-> {snnh}{attribe}) {
                    &addjhlattrib ($Awfif::memes-> {snnh}{operon}, $Awfif::attribs-> {l} [$atti][3], $Awfif::attribs-> {l} [$atti][4]);
                    $atti = $Awfif::attribs-> {l} [$atti][1];#next
                    };

                  &addjhlattribs ($Awfif::memes-> {snnh}{operon});

                  $Awfif::wsol-> {l}[$asponsor][ $Awfif::memes-> {wsogcspjhlsi}] = $Awfif::slipnet-> {l} [$Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}] {snnl} [$Awfif::memes-> {snnh}{operon}]] [2];#*** submacrok ***#
                  $Awfif::wsol-> {l}[$asponsor][ $Awfif::memes-> {wsogcjhlsi}] = $Awfif::slipnet-> {l} [$Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}] {snnl} [$Awfif::memes-> {snnh}{operon}]] [2];#*** submacrok ***#
# now add the sponsor info to the jhls
                  $Awfif::jhls-> {l} [$Awfif::wsol-> {l}[$asponsor][ $Awfif::memes-> {wsogcjhlsi}]] [14][0] = $Awfif::memes-> {currentwsbi};#*** submacrok ***#
                  $Awfif::jhls-> {l} [$Awfif::wsol-> {l}[$asponsor][ $Awfif::memes-> {wsogcjhlsi}]] [14][1] = $sponsor;#*** submacrok ***#
# and initialise the codelet count in the jhls
                  $Awfif::jhls-> {l} [$Awfif::wsol-> {l}[$asponsor][ $Awfif::memes-> {wsogcjhlsi}]] [14][2] = 0;#*** submacrok ***#
# and initialise the codelet count in the jhls
                  };#first time associating operon
# groupcompleteclp

                &itcsuse ();
                $Awfif::clp = ();
                if ((defined ($myli)) && ((!defined ($Awfif::codelet-> {l} [$myli] [13])) or ($Awfif::codelet-> {l} [$myli] [13] == 0)) && (( $Awfif::wsol-> {l} [awsoadr ($sponsor)] [8] != 0)
                or ($Awfif::wsol-> {l}[awsoadr ($sponsor)][ $Awfif::memes-> {wsologucount}] != 0))) {&break()};#*** submacrok ***#
                $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
                $Awfif::clp-> {urgency} = ($Awfif::codelet-> {l} [$myli][3] * $Awfif::memes-> {evlaunchm});
# see if can reflect the amplification in the urgency
                if ( ((defined ($Awfif::memes-> {gburgampbreak})) && (defined ($teldesc)))
                && ($Awfif::memes-> {gburgampbreak})
                && ($teldesc > 0)
                && (ampdesc ($myli, $sponsor) > 1)
                ){

                  &break();
                  };#if

                $Awfif::clp-> {urgency} = ($Awfif::clp-> {urgency} * ampdesc ($myli, $sponsor));
                if ($Awfif::codelet-> {l}[$myli][19] != 0) {
                  $Awfif::clp-> {wsi} = $Awfif::codelet-> {l}[$myli][19];
                  }#wsi set
                else {
                  $Awfif::clp-> {wsi} = $Awfif::memes-> {currentwsbi};
                  };
# groupbuildertfu2
# apply cascadesponsorship

                $Awfif::clp-> {action}-> {tfree} = cascadesponsor ($myli, $sponsor, $Awfif::memes-> {snnh}{getcassponsor});
                $Awfif::clp-> {strategy} = "tgoalscout";
# groupbuilderdsu1
# apply delayselect

                if ( (findcounter ($Awfif::wsol-> {l} [$a17][2], $Awfif::memes-> {snnh} {delayselect}, \$counteri))
                && ($Awfif::workspace-> {l} [$counteri] [9] > ($Awfif::memes-> {snnh} {wsi} + 0))
                ){

                  $Awfif::clp-> {delayselect} = ($Awfif::workspace-> {l} [$counteri] [9] - $Awfif::memes-> {snnh} {wsi}) * $Awfif::memes-> {waitamp};
                  &resetcounter ($Awfif::memes-> {snnh}{delayselect}, $a17);
                  &maskcounter ($Awfif::memes-> {snnh}{delayselect}, $a17);
                  };#if
                $Awfif::clp-> {action}-> {sponsor} = $sponsor;
                $Awfif::clp-> {action}-> {signal} = findsignal ($loconcs[$i]);
                $Awfif::clp-> {action}-> {schema} = $loconcs[$i];
                $Awfif::clp-> {action}-> {sws} = $Awfif::memes->{currentwsbi};
                $Awfif::clp-> {action}-> {wss} = $lostrts[$i];
                $Awfif::clp-> {action}-> {wsoname} = getwsoname ($lostrts[$i]);
                $Awfif::clp-> {action}-> {wse} = $loends[$i];
                $Awfif::clp-> {action}-> {jhlabeli} = $lola[$i];
# gbwstup
                $Awfif::clp-> {action}-> {jhlabeloi} = gettjhlsoi ($asponsor, $Awfif::wsol-> {l}[$asponsor][$asponsor]);#*** submacrok ***#
# groupbuildertrau2
                if (defined ($transid)) {

                  $Awfif::clp-> {action}-> {transid} = $transid;
                  };#if
# groupbuildersubpu2
                if (defined ($subpid)) {

                  $Awfif::clp-> {action}-> {subpi} = $subpid;
                  $Awfif::clp-> {urgency} *= $Awfif::memes-> {submult};
                  };#if
                if (defined ($transmgrid)) {

                  $Awfif::clp-> {action}-> {transmgrid} = $transmgrid;
                  };#if
# groupbuildersgju2
                if ($teldesc > 0){

                  my ($sgjhlsi);
                  $sgjhlsi = ($Awfif::workspace-> {l} [$teldesc][2] - $Awfif::memes-> {snnh} {wsi});
                  $Awfif::clp-> {action}-> {sgjhlsi} = $sgjhlsi;
                  };#if
                &icdsubmitcodelet ($myli, \$Awfif::clp, $Awfif::jhls-> {l} [$lola[$i]] [10], $grkwp, $grkwpr, \@$sactset);
                if (($bcindex = matchbreakthawso (awsoadr( trwsoadr($sponsor, -1)), $subpid)) > 0) {

                  &remarrent ($bcindex, \@{$Awfif::memes-> {breakthwso}});
                  &remarrent ($bcindex, \@{$Awfif::memes-> {breakthsubp}});
                  $Awfif::memes-> {breakcodelet} [ ++$Awfif::memes-> {breakcodelet} [0]] = $Awfif::memes-> {submitted};
                  if ($subpid > 0) {
                    $Awfif::memes-> {breaksubp} [ ++$Awfif::memes-> {breaksubp} [0]] = $subpid;
                    };#if
                  };#if
                &trackcodelet ($myli, $Awfif::memes-> {codeletdef}, $Awfif::memes-> {snnh} {group}, undef(), awsoadr( $sponsor), $Awfif::codelet-> {l} [$myli] [36]);
                &actnodes ( $Awfif::jhls-> {l} [$lola[$i2]][6], $Awfif::memes-> {openatype},($Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {bugroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}] | $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {delta}]));
                &invcaches ($Awfif::jhls-> {l} [$lola[$i2]][6], $Awfif::memes-> {strbool} [$Awfif::memes-> {streh} {'tdgroup'}]);
                }; #if its not an operon
              };#launch the action scout
            };#for
          };

# groupcompletemau1

        };#group complete
      };#if no group
      $gboet = time ();
      $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {gbosum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {gbosum}] + $gboet - $gbost;
      };#else indequiv cache
      };#proceed wrap
# groupbuilderwgcu7
# drop the wontgroup cache

    $Awfif::wontgroupc-> {caller} = $Awfif::memes-> {snnh} {stop};
    };#else

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ($myli);#should do role out of descriptors
    }# groupbuilder1
#
#<!-- end tag gc -->
#<!-- end tag sia -->
#<!-- end tag uts -->
#<!-- end tag scc -->
#
sub nuclabmbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($sponsor, $signal, $schema, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge, $operoncount, $proceed, $swstype,
      $grkwp, $grkwpr, @operation, $cdn, $cdnx);
#
# updated for merged workspaces

# goals must use the full workspace

    $proceed = getcontext ($myli, \$sponsor, \$signal, \$schema, \$swstype, \$grkwp, \$grkwpr, undef(), \$cdn, \$cdnx, 3);
# handle rework

    if (($proceed) && ($Awfif::codelet-> {l} [$myli][14] != 0)) {#rework so use previous parameters
      &reuselog ($myli);

      if ((($signal == $Awfif::memes->{snnh}{mpsignal}) && (defined($Awfif::memes->{snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$schema])))) {
        my ($spws);
        $spws = $Awfif::codelet-> {l} [$myli] [20];
        &updatelog ($myli, 'tngs', 1, $signal);#
        &updatelog ($myli,'tngs', 2, $schema);#

        print ("tnms sp=$spws:$sponsor,\n");
        }#multipath signal

      }# rework
    elsif ($proceed) {#main line
# Top-down nuclear label group codelets search completed groups looking for a match with their sponsoring label
# when this is true the builder will
# use selsalact to indicate which of the wso in the subschema terminated by the /memgroup are salient.
# transcribe the salient wso string
# to the cytosolic workspace
# the transcription will be active for one iteration of group builder complete when the telomeric strings will become 0 and the
# string of wso will be destroyed
#

      if ((($signal == $Awfif::memes->{snnh}{mpsignal}) && (defined($Awfif::memes->{snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$schema])))) {
# Using the mplabel check the nuclear schema for groups that match
        my ($sws, $wss, $wse);
        $sws = $Awfif::codelet-> {l} [$myli] [20];
        $wss = $Awfif::codelet-> {l} [$myli][21];
        $wse = $Awfif::codelet-> {l} [$myli][22];

# nuclabbbice
        if ((defined ($Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [13]))
        && ($Awfif::bicl-> {l} [$Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [13]] [3] == $Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [5])
          ){#there is a cache element setup

          $operoncount = usebice ($Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [13], \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge);
          }#if
        else {

          $operoncount = operonlmatch ($myli, $Awfif::codelet-> {l} [$myli][23], \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, 'specwsonlyopbinding', $Awfif::memes-> {currentwsbi});
          if (!defined ($Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [13])) {
            $Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [13] = addbice ($sws, $Awfif::jhls-> {l} [$Awfif::codelet-> {l} [$myli][23]] [5], $wse, $operoncount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge);
            };#if
          };#else
        if ($operoncount > 0) {

          my ($loopcount, $bcindex, $loperoncount, @llomatchs, @llola, @lloends, @llostrts, @lloge, @llogb, $opcount, $satisfied, $dontgiveup, $note35, $ctfifound);
          $llomatchs[0] = '';
          $llola [0] = 0;
          $lloends [0] = 0;
          $llostrts [0] = 0;
          $lloge [0] = 0;
          $llogb [0] = 0;
          for ($opcount = 0; $opcount < $operoncount; $opcount++) {
            if ($lomatchs [$opcount]) {

              $loopcount = 0;
# use selsalact to identify salient areas of the subschema of each matching schema

              $satisfied = '';
              $dontgiveup = 't';$ctfifound = '';
              while ((!$satisfied) && ($dontgiveup)) {
                if (($loopcount++ > $Awfif::memes-> {nuclabmblth}) && ($Awfif::memes-> {nuclabmbbreak}) ){ &break ();};
                $llomatchs[0] = $lomatchs [$opcount];
                $llola [0] = $lola [$opcount];
                $lloends [0] = $loends [$opcount];
                $llostrts [0] = $lostrts [$opcount];
                $lloge [0] = $loge [$opcount];
                $llogb [0] = $logb [$opcount];
                $loperoncount = 1;
                @operation = selsaliam ($myli, $sws, $wss, $wse, $operoncount, \@llomatchs, \@llola, \@lloends, \@llostrts, \@lloge, \@llogb, \@$sactset, $Awfif::memes-> {snnh}{model});
                if (($operation[0] ne '')
                && (( $operation [7] == 0 )
                  or (($operation [7] != 0)
                    && ( ( (!defined ($Awfif::jhls-> {l} [$operation [7]][17]))
# nuclabminhu1
                      or ( $dontgiveup = ctficomp ($myli, $operation [7], $kwp, $kwpr, \@$sactset, \$ctfifound) ) ) ) ) )
                ){
                  my ($hashname);
                  $satisfied = 't';

                  if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
                    &itjhloutput ($operation [7]);
                    };
# nuclabinwfcu1
# if find deployment operon in wfc cache ref don't signal deployment

                  if ((! $Awfif::memes-> {wfcoptdep})
                  or (! defined ($hashname = $Awfif::wfcdefl-> {operon} {wsolistaschst ($operation [3], $operation [4], $Awfif::codelet-> {l} [$myli] [19])}))
                  or (!defined ($Awfif::wfchchainl-> {hashname} {$hashname}))# the evaluator has been purged
                  ){

                    $Awfif::clp = ();
                    $Awfif::clp-> {urgency} = ($Awfif::codelet-> {l} [$myli][3] ); #* $Awfif::memes-> {evlaunchm});
                    $Awfif::clp-> {action}-> {schema} = $schema;
                    $Awfif::clp-> {action}-> {signal} = $signal;
                    $Awfif::clp-> {action}-> {sws} = $Awfif::codelet-> {l} [$myli] [20];
                    $Awfif::clp-> {action}-> {wss} = $operation [3];
                    $Awfif::clp-> {action}-> {wse} = $operation [4];
                    if (($operation [5] != 0)
                    && ($operation [5] != $operation [6]) ){
                      $Awfif::clp-> {action}-> {wsgs} = $operation [5];
                      $Awfif::clp-> {action}-> {wsge} = $operation [6];
                      };#operon has a gap
# nuclabmieu5
                    if (($operation [7] != 0) ){

                      $Awfif::clp-> {action}-> {sgjhlsi} = $operation [7];
                      };#operon has a subgroup jhlsi
# nuclabmtrau1
                    $note35 = $Awfif::codelet-> {l} [$myli] [35];
                    if ( ((defined ($Awfif::codelet-> {l} [$myli] [35])) && ($Awfif::codelet-> {l} [$myli] [35] != 0))
                    && (!schabldr ($myli, $lola [$opcount], $operation [7]))
                    ){#must not propogate the transaction id to this deployment codelet

                      $Awfif::codelet-> {l} [$myli] [35] = 0;
                      };#if
                    $Awfif::clp-> {action}-> {jhlabeli} = $Awfif::codelet-> {l} [$myli][23];
# nuclabmbpoolu1
                    $bcindex = matchbreakcodelet ($myli);#note if there is a breakpoint to conserve
                    &groupsinv1 ($myli, $sponsor, trwsoadr ($sponsor,1), 0, $sponsor, 0, $operation[0], $$kwp, $kwpr, \@$sactset,
                      undef(), #deferred
                      undef(), #ignore wso name
                      't' #attempt usepooling if codelet l 38 is > 0
                      );
                    $Awfif::codelet-> {l} [$myli] [35] = $note35;
                    }#if not a wfc operon match
# nuclabinwfcu2
                  elsif ( (defined ($hashname))
                  && (defined ($Awfif::wfchchainl-> {hashname} {$hashname}))
                  ){#complete this wfc operon matched transaction

                    &compwfctran ($myli, $hashname, $lola [$opcount]);
                    };#elsif
                  }#valid operation
                elsif (($Awfif::codelet-> {l} [$myli] [35] > 0) && ($ctfifound) && (!$dontgiveup) ){#if launch is tf inhibited then terminate the transaction

                  my ($trali);
                  for ($trali = 1; $trali <= $Awfif::tral-> {i} [$Awfif::codelet-> {l} [$myli] [35]] [0]; $trali++) {

                    $Awfif::tral-> {w} [$Awfif::codelet-> {l} [$myli] [35]][ $trali ] = $Awfif::memes-> {snnh} {terminated};
                    };#for
                  };#elsif
                };#while getting satisfied
              if ($bcindex > 0) {#setup for next child

                $Awfif::memes-> {breakcodelet}[++$Awfif::memes-> {breakcodelet}[0]] = $myli;
                $Awfif::memes-> {breaksubp}[++$Awfif::memes-> {breaksubp}[0]] = $Awfif::codelet-> {l} [$myli] [36];
                };#if
              &trackcodelet ($myli, $Awfif::memes-> {codeletdef}, $Awfif::memes-> {snnh} {assocf1}, undef(), undef(), $Awfif::codelet-> {l} [$myli] [36]);
              };#if
            };# for
          if ((defined ($bcindex)) && ($bcindex > 0)) {

            $Awfif::memes-> {breaksubp}[$Awfif::memes-> {breaksubp}[0]--] = undef();
            $Awfif::memes-> {breakcodelet}[$Awfif::memes-> {breakcodelet}[0]--] = undef();
            };#if
          &trackcodelet ($myli, $Awfif::memes-> {codeletdef}, $Awfif::memes-> {snnh} {assocf1}, undef(), undef(), $Awfif::codelet-> {l} [$myli] [36]);
          };#in group
        };# sps or mps signal
      };# main line

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# nuclabmbuilder1
#
#<!-- start tag sca -->
#
sub statementbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#codelet launch architecture requires the ignored parameters for its general interface
    my ($ni, $ani, $statementcomplete, $compcount, @completed, $delayplan,
    , $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat, $stbst, $stbet,
    $grkwp, $grkwpr, $cdn, $cdnx, $cwsbi);
#
# operationalize the statement

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $cdn = clogstat (\$cdnx);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdn myli $myli ");
      &itcpoutput ($myli);
      };
    if ($Awfif::memes-> {trace} == $Awfif::memes-> {tracehrtime}) {
      use Time::HiRes 'time';
      ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat) = localtime(time);
      };
# statements must use the full workspace

    $grkwp = $Awfif::wsbl->{wsoh}[$Awfif::memes->{currentwsbi}];
    $grkwpr = $Awfif::wsbl->{wsft}[$Awfif::memes->{currentwsbi}];
# choose a salient part from the workspace

    if ($Awfif::codelet->{l}[$myli][4] > 0) {
      $ni = $Awfif::codelet->{l}[$myli][4];
      if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
        &itwsoutput ( trwsoadr ($ni,1), $ni);
        };
# if not completed statement processing
      if (!findbond ($Awfif::wsol-> {l} [ awsoadr ($ni)] [2], $ni, wsbasetype ($ni), $Awfif::memes-> {snnh} {statementcategory})
      ){
# if group contained operons are statement inhibited release them
# relstinhibitors

        if ((!findbond ($Awfif::wsol-> {l} [ awsoadr ($ni)][2], $Awfif::memes-> {snnh} {valid}, $Awfif::memes-> {snnh} {statementcategory}, $Awfif::memes-> {snnh} {model})) ){

          $Awfif::wsol-> {l} [awsoadr ($ni)][2]
          = setupdesc ( $Awfif::memes-> {snnh} {statementcategory},
              ($Awfif::memes-> {snnh} {wsi} + $Awfif::memes-> {snnh} {valid}),
              $Awfif::memes-> {snnh} {model},
              $Awfif::wsol-> {l} [awsoadr ($ni)][2],
              awsoadr ($ni),
              't');
          };#release statement competitive inhibition
# sbinsgcu1
# inspect group contained operons to see if they have completed
        $stbst = time ();


        @completed = bindoptoinsp1 ($myli, $Awfif::memes->{currentwsbi}, $ni, isterminated ($ni, $grkwp, $grkwpr), \$compcount, \@$sactset);

        $stbet = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {stbbsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {stbbsum}] + $stbet - $stbst;
# sbextrau1
# external resources must be associated with the actual workspace stream they are deployed in and the agents that are interested in the resources
        $stbst = time ();

        &conagtoxr ($myli, $ni, $grkwp, $grkwpr, \@$sactset);
# if not bored with waiting for completion
        $delayplan = '';
        if ($compcount > 0) {
          my ($i);
          for ($i = 0; (($i < $compcount) && (!$delayplan));$i++) {
            if (!$completed [$i] ) {

              $delayplan = 't';
              };#if
            };#for
          };#if

        $stbet = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {stbcsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {stbcsum}] + $stbet - $stbst;

        if (
        ((!(findbond ($Awfif::wsol-> {l} [ awsoadr ($ni)] [2], $Awfif::memes-> {snnh} {stop}, wsbasetype ($ni), $Awfif::memes-> {snnh} {model}))) )
        && (findbond ($Awfif::wsol-> {l} [ awsoadr ($ni)] [2], $Awfif::memes-> {snnh} {dropthreshold}, wsbasetype ($ni), $Awfif::memes-> {snnh} {model}))
        && (findbond ($Awfif::wsol-> {l} [ awsoadr ($ni)] [2], $Awfif::memes-> {snnh} {dropopcheck}, wsbasetype ($ni), $Awfif::memes-> {snnh} {model}))
        ){
# atppenalty4

          $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} - $Awfif::memes-> {failatpr};
          };#if
        $stbst = time ();

# sbpdcau1
# manage PDCA of statement processing
        if ((!$delayplan)
        && (statementpdca ($myli, $ni, $grkwp, $grkwpr, \@$sactset)) ){

          $statementcomplete = 't';
          $ani = awsoadr ($ni);
          $Awfif::wsol-> {l} [$ani][2]
            = setupdesc ( (wsbasetype ($ni)),
            ($Awfif::memes-> {snnh} {wsi} + $Awfif::memes-> {snnh} {valid}), #to match findbond
            $Awfif::memes-> {snnh} {model},
            $Awfif::wsol-> {l} [$ani][2],
            $ani);
          &invcaches (wsbasetype ($ni));
# sbwscup
          };#if manage PDCA

        $stbet = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {stbpdcasum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {stbpdcasum}] + $stbet - $stbst;

        if ($statementcomplete) {#deploy the statement descriptor

          $Awfif::wsol-> {l} [$ani][2]
              = setupdesc ( (wsbasetype ($ni)),
                ($Awfif::memes-> {snnh} {wsi} + $ni),
                $Awfif::memes-> {snnh}{partscategory},
                $Awfif::wsol-> {l} [$ani][2],
                $ani);
          $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} + $Awfif::memes-> {batp};
# send activation to the involved Slipnet nodes
          &actnodes ( $Awfif::memes-> {snnh}{partscategory}, $Awfif::memes-> {openatype});
          &actnodes ( $Awfif::memes-> {snnh} {wsi}, $Awfif::memes-> {openato});
          &invcaches (wsbasetype ($ni));
          };#statement complete
        };#part is not whole yet
      }# got a pair to work on
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# statementbuilder1
#
#<!-- end tag ssc -->
#<!-- end tag stm -->
#<!-- end tag sca -->
Market Centric Workshops
The Physics - Politics, Economics & Evolutionary Psychology
Politics, Economics & Evolutionary Psychology

Business Physics
Nature and nurture drive the business eco-system
Human nature
Emerging structure and dynamic forces of adaptation


integrating quality appropriate for each market
 
This page looks at schematic structures and their uses.  It discusses a number of examples:
  • Schematic ideas are recombined in creativity. 
  • Similarly designers take ideas and rules about materials and components and combine them. 
  • Schematic Recipes help to standardize operations. 
  • Modular components are combined into strategies for use in business plans and business models. 

As a working example it presents part of the contents and schematic details from the Adaptive Web Framework (AWF)'s operational plan. 

Finally it includes a section presenting our formal representation of schematic goals. 
Each goal has a series of associated complex adaptive system (CAS) strategy strings. 
These goals plus strings are detailed for various chess and business examples. 
Strategy
| Design |
This page uses an example to illustrate how:
  • A business can gain focus from targeting key customers,
  • Business planning activities performed by the whole organization can build awareness, empowerment and coherence. 
  • A program approach can ensure strategic alignment. 
Program Management
| Home

Profiles | Papers | Glossary | E-mail us