Statement operation
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

Role of the statement codelet

Summary
This page looks at
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
's statement codelet. 
What the codelet's goals are. 
The three aspects of its operations are described. 
The indirect nature of its support for the applications programs and Shewhart cycles are illustrated. 
It describes how the application codelets are inhibited from action until the Statement codelet concludes the application's assertion is a hypothesis which can be tested and found to be true or false.  In the adaptive web framework's (AWF) Smiley assertion statements are used to define the test that will be applied by the application's codelets.  The statements must include schematic strings which can group complete and become associated with codelets.  Smileys own codelets: Coderack generated part and statement enforces the syntax of the assertion.  The specific form of the statements is defined in the application's Meta file.  Statement codelets also support the operation of the application's Shewhart cycle. 
or implementation, an implementation statement in the adaptive web framework's (AWF) Smiley is used to define the operational system that will be applied by the application's codelets.  The statements must include schematic strings which can group complete and become associated with codelets.  Smileys own codelets: Coderack generated part and statement enforces the syntax of the implementation statement.  The specific form of the statements is defined in the application's Meta file.  Statement codelets also support the operation of the application's Shewhart cycle.  statement is viable.  An application assertion statement is described and the schematic string included
The statement codelet Perl is Larry Wall's programming language.  It is designed to make easy tasks easy and hard tasks possible.  It has powerful text processing features and can interpret a string of text as code.   and its support infrastructure are included
Introduction
The statement codelet enforces the operation of the assertion is a hypothesis which can be tested and found to be true or false.  In the adaptive web framework's (AWF) Smiley assertion statements are used to define the test that will be applied by the application's codelets.  The statements must include schematic strings which can group complete and become associated with codelets.  Smileys own codelets: Coderack generated part and statement enforces the syntax of the assertion.  The specific form of the statements is defined in the application's Meta file.  Statement codelets also support the operation of the application's Shewhart cycle. 
or implementation, an implementation statement in the adaptive web framework's (AWF) Smiley is used to define the operational system that will be applied by the application's codelets.  The statements must include schematic strings which can group complete and become associated with codelets.  Smileys own codelets: Coderack generated part and statement enforces the syntax of the implementation statement.  The specific form of the statements is defined in the application's Meta file.  Statement codelets also support the operation of the application's Shewhart cycle.  statement used to deploy and run
Plans are interpreted and implemented by agents.  This page discusses the properties of agents in a complex adaptive system (CAS). 
It then presents examples of agents in different CAS.  The examples include a computer program where modeling and actions are performed by software agents.  These software agents are aggregates. 
The participation of agents in flows is introduced and some implications of this are outlined. 
agent-based
applications.  An example of a simple test assertion is test file awfart04.  The statement codelet is part of a complex adaptive system (
This page introduces the complex adaptive system (CAS) theory frame.  The theory is positioned relative to the natural sciences.  It catalogs the laws and strategies which underpin the operation of systems that are based on the interaction of emergent agents. 
John Holland's framework for representing complexity is outlined.  Links to other key aspects of CAS theory discussed at the site are presented. 
CAS
) which extends Douglas Hofstadter & Melanie Mitchell's
This page discusses the interdependence of perception and representation in a complex adaptive system (CAS).  Hofstadter and Mitchell's research with Copycat is reviewed. 
Copycat architecture

The three aspects of the statement codelet's operations
The statement:
Inspection of application operons
To check if the statement's operon is an addressable control structure which is used in biological cells to control access to other regions of the DNA. 
s are all complete, operon model codelets can provide descriptions of their progress, and an inspection codelet known to the Slipnet.  The statement builder interrogates the Slipnet defined inspectors associated with the deployed statement operons. 

Inhibition of application until statement is known to be viable
The statement evaluator will not signal the statement builder until both development is a phase during the operation of a CAS agent.  It allows for schematic strategies to be iteratively blended with environmental signals to solve the logistical issues of migrating newly built and transformed sub-agents.  That is needed to achieve the adult configuration of the agent and optimize it for the proximate environment.  Smiley includes examples of the developmental phase agents required in an emergent CAS.  In situations where parents invest in the growth and memetic learning of their offspring the schematic grab bag can support optimizations to develop models, structures and actions to construct an adept adult.  In humans, adolescence leverages neural plasticity, elder sibling advice and adult coaching to help prepare the deploying neuronal network and body to successfully compete. 
and statement are whole.  Applications can provide an
This page describes the inhibitor framework provided by the adaptive web framework's (AWF) 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 restriction process. 
The Slipnet inhibitor descriptions are included. 
The codelets and supporting infrastructure are included. 
inhibitor
which will cause the application codelets to be inhibited from running until the inhibitor's requirements are met.  One requirement of application codelet inhibitors (such as lb inhibitor) can be the presence of a statement descriptor {model}-{statement category}-> {valid}.

#<!-- start tag gc -->
#<!-- start tag tfw -->


AWF test art4
The art4 test statement shown following this description includes multiple parts:
The test framework should respond to this statement, decoding it's
This page introduces the many ways a complex modeling and coordination activity can be implemented using agent-based programming (see presentation). 

It describes how salient schematic alternative strings can be used to model a situation and make a decision under evolved control. 

It also introduces bottom up model codelets and complex techniques that are covered more fully on other pages. 

Constraints on the modeling process including requirements for timeliness, parallelism, synchronization and emergence of new models are discussed. 

Once a schematic sequence is selected by a group codelet or any additional type of modeling codelet the codelet will initiate an iterative cycle of detect, signal, match, deploy.  This allows the actions of a schematically selected sequence of model codelets to aggregate into a focused agent. 

A series of example signals sent by complex modeling codelets along with their associated operons and subgroup schematic sequences are included.  The signals are sent by the:
  • merge streams spdca builder - The initiator of merge streams's pdca cycle (see schematic pdca).
  • merge streams dcycip builder - The initiator of the planning phase of the merge streams's pdca cycle. 
  • merge streams cassert builder - The initiator of the mergestreams's case resolved assert true conditional cascade.  It is a structurally enhanced codelet which activates at the end of the 'do' phase and signals the nucleus. 
  • merge streams indsloc builder - The start locator codelet finds the application schemata's start operon
  • merge streams shsloc builder - A start locator codelet that finds an alternative start operon in the application schematic operon
  • merge streams rchpair builder - A receptor that detects and relays an application signal
  • pdca ecycdop builder - A cyclin simulation codelet which signals entry to the 'do' phase of the pdca. 
  • pdca acycchp builder - A cyclin simulation codelet which signals entry to the 'check' phase of the pdca. 
  • pdca bcycacp builder - A cyclin simulation codelet which signals entry to the 'act' phase of the pdca. 
And the Slipnet configuration which activates the schematic subgroup sequence <mergestreams> <for> <case> <resolved> <assert> <true> is included. 
parts
and then if it conforms to the
This page looks at how Smiley processes the statement, such as a test request, to ensure that the statement contains all required parts. 
Smiley does this through the operation of a statement codelet which indirectly sponsors the modeling of the whole statement. 
The modeling itself is performed by model codelets. 
The group models' Slipnet associations are included. 
The codelets and supporting functions are included. 
expected statement structure
,
This page looks at Smiley's statement codelet. 
What the codelet's goals are. 
The three aspects of its operations are described. 
The indirect nature of its support for the applications programs and Shewhart cycles are illustrated. 
It describes how the application codelets are inhibited from action until the Statement codelet concludes the application's assertion or implementation statement is viable.  An application assertion statement is described and the schematic string included. 
The statement codelet Perl and its support infrastructure are included. 
operating the statement
and thus initiating the test application executing first a
This page discusses how Smiley can support the start of the development phase of an agent-based application. 
Startup is an artificial operation not found in living systems.  But Smiley must do it and so we discuss an example of starting the development phase. 
With the Smiley infrastructure and the application integrated the application's development phase is reviewed.
The association of structural Workspaces for state representation is discussed. 
The aggregation of schematic associations of codelets defines a development agent.  At the application level it processes the application's schematic strings. 
The schematic nature of the data processed by the test application suggests the use of an indirect integration framework.  This supports the binding of codelets to the schematic data and detecting and responding to the control operons. 
An application polymerase complex emerges. 
The codelets and supporting functions are included. 
development codelet cascade
and then a
Walter Shewhart's iterative development process is found in many complex adaptive systems (CAS).  The mechanism is reviewed and its value in coping with random events is explained. 
Shewhart cycle
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. 
managed
analysis of the direct and indirect details of the
This page discusses how a Smiley based application the event processor test program's operational phase is structured. 
The goals of the event processor test application are described. 
The implementation strategy is outlined. 
Synchronization of Smiley setup completion and operation phase initiation is discussed. 
The association of structural Workspaces for state representation is discussed. 
An application specific codelet merge streams assert responds to the nature of the assertion.  It does not have an emergent structure.  Instead it reflects software engineering practice.  It includes:
  • Merge stream case specific
    • Modeling with sub-programs
    • Resolving of case
  • Non case assertion
The operation is setup, inhibited, initiated, and managed by iterative phase check-pointing provided by Smiley codelets. 
Schematic synchronization of parallel codelet cascades is performed structurally. 
The assert merge operon cascade is included. 
The Slipnet concept network for merge streams is included. 
The codelets and supporting functions are included. 
assertion


 


<assert> <process> <rhlmsge> <merge> <streams> <file> </rhlmsge> <subject>
<rhlmsge> <merge> <file> <name> <equals> istrings/awfprogi[16].html</rhlmsge>
<rhlmsge> <ivariable> <name> <equals> <rhlwpbanner> "images/hill.gif"</rhlwpbanner> </rhlmsge> </subject> <verb>
<rhlmsge> <replaces> <subject> <resolved> <resource> <in> <target> <file> <stream> </rhlmsge> </verb> <object>
<rhlmsge> <source> <file> <stream> </rhlmsge>
<rhlmsge> <ivariable> <name> <equals> <rhlwpbannertp> </rhlmsge> </object>
<equals> <truthassertion> true</truthassertion> <development>
<rhlmsge> <develop> <lists> </rhlmsge> </development> <assume>
<rhlmsge> <referenced> <streams> <specified> <in> <merge> <stream> </rhlmsge> <and> <rhlmsge> <case> <selector> <is> li</rhlmsge> </assume> </assert> <comment> <br>


#<!-- end tag tfw -->
#<!-- end tag gc -->

Functions

#<!-- start tag sca -->
#<!-- start tag ca -->
#
sub selsalwsitem {# select a salient workspace item
    my($myli, $nextinstance, $tinstances, $kwp, $kwpr, $sactset, $strategy, $omeric)=@_;
    my ($i, $i2, $found, @ca, $change, $thenextinstance, $loadcache, $usecache, $concept, $nobackoff, $ni, $ikwp, $akwp,
    $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("selsalwsitem myli $myli, strategy $strategy sactset($$sactset[0]) ");
      if (defined ($$omeric)) {
        print ("oligomeric ($$omeric) ");
        };
      };
# updated for merged workspaces

    if ($Awfif::memes-> {trace} == $Awfif::memes-> {tracehrtime}) {
      use Time::HiRes 'time';
      ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat) = localtime(time);
      };
    $akwp = awsoadr ($kwp);
# move the kwp out of the inactive histone
    if (($Awfif::wsol-> {l}[$akwp][ $Awfif::memes-> {wsohistbp}] != 0) #*** submacrok ***#
    && ($Awfif::histonel-> {l} [$Awfif::wsol-> {l}[$akwp][ $Awfif::memes-> {wsohistbp}]] [2] == 1)) {#*** submacrok ***#

      $ikwp = nextihistone ($kwp, \$akwp);

      }#if
    else {

      $ikwp = $kwp;
      };#else
    $nobackoff = '';
    if ((defined ($$omeric)) && ($$omeric > 1) ){
      $$omeric = 1;
      }#if
    elsif ((defined ($$omeric)) && ($$omeric == 1) ){
      $nobackoff = 't';
      };# elsif
    $found = '';
    $$tinstances = 0;
    $i2 = 0;
    $ni = 1;
    $loadcache = 2;
    $concept = $Awfif::codelet-> {l}[$myli][10];
    if (
      (!defined($Awfif::codelet-> {l}[$myli][10])) or
      ( toofewwso($kwp, $kwpr, 5))) {#list based ckecking

      $usecache = '';
      }
    else {

      $usecache = 't';
      $concept = conmsalb ($myli, $Awfif::codelet-> {l}[$myli][10], $strategy);
      };
    &itwscachecor ($strategy, $concept, 'seq', 'selsalwsitem');

# selsalcdelup1
    if (($usecache)
    && ( ($strategy ne 'tdgroup')
    && (checkcache ($strategy, $concept, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}) != 2))

    or ( (($strategy eq 'tdgroup') && (!$nobackoff) && (checkcache ($strategy, 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}) != 2) ) #should only be nobackoff if repeat call inside of tdgroupscoute so external conditions can not have changed

    or ( ($strategy eq 'tdgroup') && ($nobackoff) && (checkcache ($strategy, 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}) != 5)
      && (checkcache ($strategy, 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}) != 2) ) )
    ) {# cache must be loaded

      if (
      (($strategy eq 'tdgroup') && (checkcache ($strategy, 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}) != 0))
      ) {# if cache is partly invalid this is indicated by a 1 or 4

        $loadcache = checkcache ($strategy, 0, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid});
        }#if
      elsif ((checkcache ($strategy, $concept, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}) != 0)
      ) {# if cache is partly invalid this is indicated by a 1 or 4

        $loadcache = checkcache ($strategy, $concept, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid});
        }#elsif
      else {

        $loadcache = 0 + $Awfif::memes-> {backoffactive} {$strategy};#cache must be reloaded
        };#else

      &setcache ($strategy, $concept, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}, 2 + $Awfif::memes-> {backoffactive} {$strategy});
      if (($strategy =~ /^t/)
      ){
# selsalomerup1

        &setanywscache ($strategy, 2, $nobackoff);
        };
      if ((defined($Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}]))
      ) {

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

        while ($Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}] != 0) {# clear out the old set of items

          &freenormitem ($Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}], $strategy);
          };#while

        &freenormiteme ($strategy);

        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];
        };#if
      };#control the loading of the cache
    if (($usecache) && ($Awfif::norml-> {h}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}] != 0)) {#can use the normalisation cache
# ******** ****** the next instance is obtained directly from the norlalized list ****** ****

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

      $$nextinstance = $Awfif::norml-> {l} [$Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}]][4];
      &freenormitem ($Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}], $strategy);
      &freenormiteme ($strategy);
      $found = 't';
      if (($$nextinstance == 0) or (!defined($$nextinstance))) {

        &break ();
        $found = '';
        };

      $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
      $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];
      }
    else {

      if (($usecache) && ($loadcache == 2)
      or (($usecache) && ($loadcache == 5) && ($nobackoff))
      ) {# cache for this concept is correctly loaded
# ******** ******* can get the total salience and i2 values from the cache ******* ********

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

        $i2 = checkcache ($strategy, $concept, undef(), undef(), $Awfif::memes-> {ci2});
        $$tinstances = checkcache ($strategy, $concept, undef(), undef(), $Awfif::memes-> {ctinst});

        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswicsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswicsum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];
        }
      else {# at best cache partly loaded (per wso)
        my($ai, $gdeltachange);
# ****** ******* ********** main workspace salience iterative calculation ****** ****
        $i = $kwpr;
        while (($i != 0) && ($i != $ikwp)) {#updated for merged workspaces

          $gdeltachange = undef ();
          if (($strategy eq 'tdgroup')
          && (defined ($Awfif::memes-> {gdeltachange} {($ai = awsoadr ($i))}))
          ){
            $gdeltachange = $Awfif::memes-> {gdeltachange} {$ai};
            $Awfif::memes-> {gdeltachange} {$ai} = undef();
            };

          if (($usecache)
          && ($Awfif::wsol-> {ni} [awsoadr ($i)] == 1)
          && ((!defined ($gdeltachange))
            or (($strategy eq 'tdgroup') && (!$gdeltachange))
            or ($strategy ne 'tdgroup'))
          && (notcsponsor ($Awfif::memes-> {currentwsbi}, $i, $loadcache))
          && (checkcache ($strategy, $concept, undef(), awsoadr ($i), $Awfif::memes-> {cvpcwso}) != 0) ){

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

            $change = checkcache ($strategy, $concept, undef(), awsoadr($i), $Awfif::memes-> {cchange});

            $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
            $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswicsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswicsum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];
            }
          else {#if active these wso will have to be re calculated invalidating the caches-for-all-concepts at this wso position.
            my($change1);

            $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}] = time ();
            $ai = awsoadr ($i);
# salwsitemihist
# no salience calculation on inactive histone
            if (($Awfif::wsol-> {l}[$ai][ $Awfif::memes-> {wsohistbp}] != 0) #*** submacrok ***#
            && ($Awfif::histonel-> {l} [
              $Awfif::wsol-> {l}[$ai][ $Awfif::memes-> {wsohistbp}]] [2] == 1)#*** submacrok ***#
                ) {#ignore this inactive histone
              $change = 0;
              if ($usecache) {

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cvpcwso}, 1);

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cchange}, $change);
                };
              if ($Awfif::histonel-> {l} [
                $Awfif::wsol-> {l}[$ai][ $Awfif::memes-> {wsohistbp}]#*** submacrok ***#
                  ] [3] != 0){

                $i = $Awfif::histonel-> {l} [
                  $Awfif::wsol-> {l}[$ai][ $Awfif::memes-> {wsohistbp}]#*** submacrok ***#
                    ] [3];
                }#if
              else {#some histones are not contiguous

                $i = trwsoadr ($i, 1);
                };
              }#if
# salwsitemichar
            elsif (wsbasetype ($i) == $Awfif::memes->{snnh}{ichar}) {#ignore this wso
              $change = 0;
              if ($usecache) {

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cvpcwso}, 1);

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cchange}, $change);
                };
              }#if
# salwsitemietrmgrgu1
            elsif ((($strategy eq 'tdgroup') or ($strategy eq 'bugroup')) && (tmgiegsponsor ($i) > 1)) {#special processing of this whole group

              $change = tmgiegsalience ($myli, $i, $kwp, $kwpr, $strategy, \$ni);
              if ($ni > 1) {

                $Awfif::wsol-> {ni}[$ai] = $ni;
                };
              if ($usecache) {

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cvpcwso}, 1);

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cchange}, $change);
                if ($loadcache != (0 + $Awfif::memes-> {backoffactive} {$strategy})) {

                  &setcache ($strategy, $concept, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}, (1 + $Awfif::memes-> {backoffactive} {$strategy}));
                  };#if
                };#if
              }#if
            else {#active wso

              $change = $Awfif::memes-> {binds}-> {$strategy}->
              ($myli, $i, $kwp, $kwpr, \$change1);#mean change
              if ($usecache) {

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cvpcwso}, 1);

                &setcache ($strategy, $concept, undef(), $ai, $Awfif::memes-> {cchange}, $change);
                if ($loadcache != (0 + $Awfif::memes-> {backoffactive} {$strategy})) {

                  &setcache ($strategy, $concept, $Awfif::memes-> {currentwsbi}, undef(), $Awfif::memes-> {cvalid}, (1 + $Awfif::memes-> {backoffactive} {$strategy}));
                  };#if
                };
              };#else

            $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
            $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiisum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiisum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];
            };#else
          if ($change > 0) {

            $$tinstances = $$tinstances + $change;
            $i2++;
            $ca[$i2] = $i;# record which items contribute
            if (($usecache) ) {# cache loaded

              &setcache ($strategy, $concept, undef(), $i2, $Awfif::memes-> {cvpci}, $i);
              };#if cache in use
            };#if

          if (($strategy eq 'tdgroup') or ($strategy eq 'bugroup')) {

            $i = trwsoadr ($i, $Awfif::wsol-> {ni} [awsoadr ($i)]);#get the next wso
            }#if
          else {

            $i = trwsoadr ($i, 1);
            };#else
          $ni = 1;
          if (matchbreaksalwso ($i) > 0) {

            &break();
            };#if
          }# for -> while
# ******* *********** ********* end of main workspace salience iterative calculation ****** *******
        if (($usecache) ) {# cache loaded

          &setcache ($strategy, $concept, undef(), undef(), $Awfif::memes-> {ci2}, $i2);
          &setcache ($strategy, $concept, undef(), undef(), $Awfif::memes-> {ctinst}, $$tinstances);
          };#if cache in use
        };#else
# if try to normalize too small a population the results will bias
# towards some items
# This routine aims to stop this by switching to a random selection method
#

      if (($$tinstances > 0) && ($i2 >= $Awfif::memes-> {minnorm})) {#active objects to select
        my ($i5, $nslinkh);

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

        for ($i5 = 1; $i5 <= $Awfif::memes-> {maxnormitems}; $i5++) {

          $$nextinstance = 1 + int (rand ($$tinstances));
          $nslinkh = addnormitem ($$nextinstance, $strategy);
          }; #create the set of tinstances
        &ordnormlist ( $nslinkh, $strategy);
# now match the list of t elements with wsoids provided by normwsitem


        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];

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

        $$nextinstance = normwsitem ($myli, $$nextinstance, $kwp, $kwpr, $strategy);

        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiisum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiisum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];

# know now have a nextinstance - throw away this item from the tail of the cache
        $$nextinstance = $Awfif::norml-> {l} [$Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}]][4];
        &freenormitem ($Awfif::norml-> {t}[$Awfif::memes-> {currentwsbi}][ $Awfif::cache-> {h}{$strategy}], $strategy);
        &freenormiteme ($strategy);

        $found = 't';
        if (($$nextinstance == 0) or (!defined($$nextinstance))) {

          &break ();
          $found = '';
          };

        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] = time ();
        $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] = $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswinsum}] + $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswiet}] - $Awfif::memes-> {time} [$Awfif::memes-> {spctime}] [$Awfif::memes-> {ch}{$Awfif::codelet-> {l} [$myli] [2]}] [$Awfif::memes-> {sswist}];
        }#active objects found
      elsif ($$tinstances > 0 ) {

        $thenextinstance = 1 + int (rand ($i2));
        if (($usecache) && ($loadcache == 2)) {# cache loaded

          $$nextinstance = checkcache ($strategy, $concept, undef(), $thenextinstance, $Awfif::memes-> {cvpci});
          }
        else {

          $$nextinstance = $ca[$thenextinstance];
          };
        $found = 't';
        if (($$nextinstance == 0) or (!defined($$nextinstance))) {

          &break ();
          $found = '';
          };
        }
      else {

        $$nextinstance = 0;
        };#else
      };#else
    if ((defined ($$omeric)) && ($$omeric > 1) ){

      $$omeric = 1;
      }#if
    elsif ((defined ($$omeric)) && ($$omeric == 1) ){

      $nobackoff = 't';
      };# elsif
    if (($strategy =~ /^t/)
    ){

      &setanywscache ($strategy, 2, $nobackoff);
      };
    &uwsohist ($$nextinstance);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("selsalwsitem nextinstance $$nextinstance ret($found)\n");
      };
    return $found
    }# selsalwsitem
#
#<!-- end tag ca -->
#
sub addsp {
    my ($sponsor) = @_;
# setup the structures to support linked buffers
    my ($nslinkh);
#
# checked for merged workspaces

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("addsp ");
      };
# create an active descriptor
    $nslinkh = addli (\$Awfif::aspl);
    $Awfif::aspl-> {l} [$nslinkh][3] = 0;
    $Awfif::aspl-> {i}[$nslinkh] = $sponsor;
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("addspx ret $nslinkh\n");
      };

    return $nslinkh
    }# addsp
#
#<!-- start tag ssc -->
#
sub statementwhole {# assess this part for its wholeness
    my($myli, $sti, $kwp, $kwpr, $sactset)=@_;
    my ($whole, $giveup);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("statementwhole myli $myli ");
      };
# updated for merged workspaces
# statementwhole is called within statement codelet
# it uses statement/part model launcher to check if the whole statement associated with cascade statementlabel is modelled and described as model-(assert|implement)->whole or stopped,

    $whole = ilaunchmodel ($myli, $sti, 'statementlabel', $Awfif::memes-> {snnh} {whole}, \$giveup, $kwp, $kwpr, \@$sactset);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("statementwholex giveup $giveup ret ($whole)\n");
      };
    return $whole
    }# statementwhole
#
#<!-- end tag ssc -->
#<!-- start tag ssc -->
#
sub developmentwhole {# assess this part for its wholeness
    my($myli, $sti, $kwp, $kwpr, $sactset)=@_;
    my ($whole, $giveup);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("developmentwhole myli $myli ");
      };
# updated for merged workspaces
# developmentwhole is called within statement codelet
# it uses statement/part model launcher to check if the plan associated with cascade developmentlabel is modelled and described as model-(assert|implement)->devpwhole or stopped,

# updated for merged workspaces
# first check that development is whole at the part level
    if (!findbond ($Awfif::wsol-> {l} [ awsoadr ($sti)] [2], $sti, wsbasetype ($sti), $Awfif::memes-> {snnh} {partscategory})) {
      if (partwhole ($myli, $sti, $Awfif::memes-> {snnh} {devpwhole}, $kwp, $kwpr, \@$sactset)) {
        my ($asti);

        $asti = awsoadr ($sti);
        $Awfif::wsol-> {l} [$asti][2]
            = setupdesc ( (wsbasetype ($sti)),
              ($Awfif::memes-> {snnh} {wsi} + $sti),
              $Awfif::memes-> {snnh}{partscategory},
              $Awfif::wsol-> {l} [$asti][2],
              $asti);
        };#if
      }#if
    else {
# Once that assessment is complete and successful can look at the statement level wholeness
# changed from devwhole since partwhole checks for whole specifically

      $whole = ilaunchmodel ($myli, $sti, 'developmentlabel', $Awfif::memes-> {snnh} {devpwhole}, \$giveup, $kwp, $kwpr, \@$sactset);
      };#else part level is whole

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("developmentwholex giveup $giveup ret ($whole)\n");
      };
    return $whole #which indicates only that the dev schema is structurally whole. It will not have been schematically developed until deviwhole is true
    }# developmentwhole
#
#<!-- end tag ssc -->
#<!-- start tag sca -->
#
sub bindoptoinsp1 {# inspect enclosed operons
    my($myli, $sws, $wss, $wse, $compcount, $sactset)=@_;
    my ($i, $i2, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge, $operoncount,
      $cwsbi,
      , $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat, $stbst, $stbet,
      $linkp, @completed, $awss);

    if ($Awfif::memes-> {trace} == $Awfif::memes-> {tracehrtime}) {
      use Time::HiRes 'time';
      ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdat) = localtime(time);
      print ("bindoptoinsp sactset($$sactset[0]) ");
      };

    $stbst = time ();
# bindoptoinspbic
    $cwsbi = $Awfif::memes-> {currentwsbi};
    $Awfif::memes-> {currentwsbi} = $sws;
    $awss = awsoadr ($wss);
    $Awfif::memes-> {currentwsbi} = $cwsbi;
    if (($Awfif::wsol-> {l}[$awss][ $Awfif::memes-> {wsobti}] != 0)#*** submacrok ***#
    && ($Awfif::bicl-> {l} [$Awfif::wsol-> {l}[$awss][ $Awfif::memes-> {wsobti}]] [2] == $sws)#*** submacrok ***#
    && ($Awfif::bicl-> {l} [$Awfif::wsol-> {l}[$awss][ $Awfif::memes-> {wsobti}]] [3] == $wss)#*** submacrok ***#
    && ($Awfif::bicl-> {l} [$Awfif::wsol-> {l}[$awss][ $Awfif::memes-> {wsobti}]] [4] == $wse)#*** submacrok ***#
    ){#there is a cache element setup

      $operoncount = usebice (
        $Awfif::wsol-> {l}[$awss][ $Awfif::memes-> {wsobti}]#*** submacrok ***#
          , \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge);
      }#if
    else {

      $operoncount = operonmatch ($myli, $sws, $wss, $wse, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, 'opbinding');
      if ($Awfif::wsol-> {l}[$awss][ $Awfif::memes-> {wsobti}] == 0){#*** submacrok ***#

        &setwsmd ($awss, $Awfif::memes-> {wsobti}, addbice ($sws, $wss, $wse, $operoncount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge));
        };#if
      };#else

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

    $stbst = time ();

    for ($i2 = 0; $i2 < $operoncount; $i2++) {#scan the full set of operons

      my ($found);
      $found = '';
      $completed [$i2] = 't'; #if no interface assume its completed
      if ($lomatchs[$i2]) {#there is a link inspect the status
# only if this is an operon
        if (($Awfif::jhls-> {l} [$lola[$i2]][4] == $Awfif::memes-> {snnh}{operon})
        or (($Awfif::jhls-> {l} [$lola[$i]] [4] == $Awfif::memes-> {snnh} {stbinding}) && ((!defined ($myli)) or ($Awfif::codelet-> {l} [$myli] [36] == 0)))
        or (($Awfif::jhls-> {l} [$lola[$i]] [4] == $Awfif::memes-> {snnh} {subpstbinding}) && (defined ($myli)) && ($Awfif::codelet-> {l} [$myli] [36] != 0) && (($Awfif::subpl-> {l} [$Awfif::codelet-> {l} [$myli] [36]] [4] == $lola[$i]) or ($Awfif::subpl-> {l} [$Awfif::codelet-> {l} [$myli] [36]] [5] == $lola[$i]) or ($Awfif::subpl-> {l} [$Awfif::codelet-> {l} [$myli] [36]] [8] == $lola[$i])))
        ) {

          $linkp = $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::jhls-> {l} [$lola[$i2]][6]];

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

              $found = 't';
              &ucsehist ($Awfif::memes->{snnih}{$Awfif::slipnet-> {l} [$linkp][2]});
              no strict 'refs';
              $completed [$i2] = $Awfif::memes-> {binds}-> {$Awfif::memes->{snnih}{$Awfif::slipnet-> {l} [$linkp][2]}}-> ($myli, $Awfif::jhls-> {l} [$lola[$i2]][7], $Awfif::jhls-> {l} [$lola[$i2]][8], $Awfif::jhls-> {l} [$lola[$i2]][9]);

              if ($Awfif::memes-> {currentwsbi} == 0) {&break();};
              if (!$completed [$i2]) {

                &actnodes ( $Awfif::jhls-> {l} [$lola[$i2]][6], $Awfif::memes-> {openatype});
                &invcaches ($Awfif::jhls-> {l} [$lola[$i2]][6], $Awfif::memes-> {strbool}[$Awfif::memes-> {streh} {tdgroup}]);
                };#ramp pseudo concept activation
              }
            $linkp = $Awfif::slipnet-> {l}[$linkp][0];
            }#while
          }; #if its an operon
        };#if
      }; #for

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

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("bindoptoinsp1x compcount $$compcount ret (@completed)\n");
      };
    return @completed
    }# bindoptoinsp1
#
sub conagtoxr {# connect agent to external resource
    my($myli, $wso, $kwp, $kwpr, $sactset)=@_;
    my ($i, $awso, $twso, $deployed, $found, $linkp, $descp, $sgdi, $sponsor, $asponsor, $cwsbi );

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("conagtoxr myli $myli wso $wso sactset($$sactset[0]) ");
      &itwsoutput (trwsoadr ($wso,1), $wso);
      };
# updated for merged workspaces
    $cwsbi = $Awfif::memes-> {currentwsbi};
    $deployed = '';
    $awso = awsoadr ($wso);
    $twso = isterminated ($wso, $kwp, $kwpr);
# connect agent to external resource

    $linkp = $Awfif::memes-> {snw} [$Awfif::memes-> {currentwsbi}]-> {snnl}[$Awfif::memes-> {snnh} {externalrescategory}];
    while (($linkp != 0)) {
      if (($Awfif::slipnet-> {l}[$linkp][3] == $Awfif::memes-> {snnh}{cinstance})
      ) {#check the wso descriptor list for matching descriptors and if found communicate attributes to groups

        $descp = $Awfif::wsol-> {l} [$awso][2];
        while (($descp != 0)) {
          if (($Awfif::workspace-> {l}[$descp][3] == $Awfif::memes-> {snnh}{attrib})
          && ($Awfif::workspace-> {l}[$descp][4] == $Awfif::slipnet-> {l}[$linkp][2])
          ) {#if found communicate attributes to groups

            $found = 't';
# process direct reference structures immediately after the stream specification
            $i = $Awfif::attribs-> {l} [($Awfif::workspace-> {l}[$descp][2] - $Awfif::memes-> {snnh}{wsi}) + 3][3];
            fgrpd ($myli, $i, \$sgdi, $Awfif::memes->{snnh}{groupcategory});
            $sponsor = fgrpsponsor ($i, $Awfif::workspace-> {l} [$sgdi] [3], $Awfif::memes-> {snnh} {groupcategory});

            $i = trwsoadr (fgrpend ($sponsor), 1);
            while (($i != 0) && ($i != $twso) && (!($found = fgrpd ($myli, $i, \$sgdi, $Awfif::memes->{snnh}{groupcategory})))) {

              $i = trwsoadr ($i, 1);
              };#while searching for related group
            if (($i != 0) && ($i != $twso) ) {
              $sponsor = fgrpsponsor ($i, $Awfif::workspace-> {l} [$sgdi] [3], $Awfif::memes-> {snnh} {groupcategory});
              $asponsor = awsoadr ($sponsor);
              $Awfif::wsol-> {l} [$asponsor][2]
                = setupdesc ( $Awfif::slipnet-> {l}[$linkp][2],
                  ($Awfif::memes-> {snnh} {wsi} + $Awfif::attribs-> {l} [($Awfif::workspace-> {l}[$descp][2] - $Awfif::memes-> {snnh}{wsi}) + 2][3]),
                  $Awfif::memes-> {snnh} {associative},
                  $Awfif::wsol-> {l} [$asponsor][2],
                  $asponsor);
              $deployed = 't';
              };#if
            };#if
          $descp = $Awfif::workspace-> {l}[$descp][0];
          };#while
        };#if
      $linkp = $Awfif::slipnet-> {l}[$linkp][0];
      }#while
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("conagtoxrx ret ($deployed)\n");
      };
    return $deployed
    }# conagtoxr
#
#<!-- start tag scs -->
#<!-- start tag scl -->
#
sub statementpdca {#
    my($myli, $sti, $kwp, $kwpr, $sactset, $iststrategy)=@_;
    my ($finished, $giveup, $ststrategy);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("statementpdca myli $myli ");
      };
# updated for merged workspaces
# statementpdca is called within statement codelet
# it uses statement/part model launcher to check if the plan associated with cascade statementpdcal is modelled and described as model-(assert|implement)->plan or stopped,

    if (!defined ($iststrategy) ){

      $ststrategy = 'statementpdcal';
      } #if
    else {

      $ststrategy = $iststrategy;
      };#else

    $finished = ilaunchmodel ($myli, $sti, $ststrategy, $Awfif::memes-> {snnh} {plan}, \$giveup, $kwp, $kwpr, \@$sactset);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("statementpdcax giveup $giveup ret ($finished)\n");
      };
    return $finished
    }# statementpdca
#
#<!-- end tag scl -->
#<!-- end tag scs -->
#<!-- end tag sca -->
#
sub finddevni {# check if statement has a development declaration
    my($myli, $kwp, $kwpr)=@_;
    my ($i, $finished);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("finddevni myli $myli ");
      };
# updated for merged workspaces
# statementpdca is called within statement codelet

    $i = $kwpr;
    while (($i != $kwp) && ($i != 0) && ($finished == 0)) {
      if (wsbasetype ($i) == $Awfif::memes-> {snnh} {development}) {
        $finished = $i;
        };#if
      $i = trwsoadr ($i,1);
      }; #while

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("finddevnix ret ($finished)\n");
      };
    return $finished
    }# finddevni
#
#
sub allpartsconstrained {# select a salient workspace part
    my($myli, $giveup, $kwp, $kwpr, $sactset)=@_;
    my ($i, $parti, $aparti, $type, $constrained);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("allpartsconstrained myli $myli kwp($kwp) kwpr($kwpr) sactset($$sactset[0]) ");
      };
# updated for merged workspaces

    $constrained = 't';
    $$giveup = '';
    if ($Awfif::pcache-> {p} [$Awfif::memes-> {currentwsbi}] >= 3) {# there are parts
# see if the modelling still needs to agree some part is constrained
      for ($i = 1; ($i < $Awfif::pcache-> {p} [$Awfif::memes-> {currentwsbi}] && ($constrained) && (!$$giveup)); $i++) {#check each entry in {l}
        $parti =$Awfif::pcache-> {l} [$Awfif::memes-> {currentwsbi}] [$i];

        $aparti = awsoadr ($parti);
        $type = wsbasetype ($parti);
        if ((($constrained = findbond ($Awfif::wsol-> {l} [ $aparti] [2], $Awfif::memes-> {snnh} {constrained}, $type, $Awfif::memes-> {snnh} {model})))
        && ((!($$giveup = findbond ($Awfif::wsol-> {l} [ $aparti] [2], $Awfif::memes-> {snnh} {stop}, $type, $Awfif::memes-> {snnh} {model}))) )
        ){
# check the next

          };#if
        };#for
      }#if
    elsif (($Awfif::memes-> {currentwsbi}==2) && ($Awfif::pcache-> {accessed} [$Awfif::memes-> {currentwsbi}])) {# not well formed statement

      $$giveup = 't';
      $constrained = '';
      }# elsif
    else {

      $constrained = '';
      };# else

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("allpartsconstrainedx giveup $$giveup ret ($constrained)\n");
      };
    return $constrained
    }# allpartsconstrained
#
#
sub dnamechars {
    my ($sponsor, $chartype, $wsi) = @_;
    my ($rbuffer, $linkp, $i, $gend, $gendp1, $asponsor, $cwsi);
# get the character stream from a workspace groups chars
# with special handling of case attributes
#
# updated for merged workspaces

    if (defined($wsi)) {#different workspace
      $cwsi = $Awfif::memes-> {currentwsbi};
      $Awfif::memes-> {currentwsbi} = $wsi;
      };

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("dnamechars sponsor ($sponsor) wsi ($wsi) ");
      &itwsoutput ( trwsoadr ($sponsor, 1), $sponsor);
      };

    $rbuffer = '';
    $asponsor = awsoadr ($sponsor);
# from the sponsor wso find the start of the group
    $linkp = $Awfif::wsol-> {l}[$asponsor][2];
    while (($linkp != 0) && ($Awfif::workspace-> {l}[$linkp][4] != $Awfif::memes-> {snnh}{groupstart})) {

      $linkp = $Awfif::workspace-> {l}[$linkp][0];
      };
    if ($linkp != 0) {#found group start descriptor

      $i = $Awfif::workspace-> {l}[$linkp][2] - $Awfif::memes-> {snnh}{wsi};
      };
# note the end of the group
    $gend = fgrpend ($sponsor);
    $gendp1 = trwsoadr ($gend, 1);# to enable while until gend reached
# look at the base type for a char
    while (($i != $gendp1) && ($i != 0) && (wsbasetype ($i) != $Awfif::memes-> {snnh}{char})) {

      $i = trwsoadr ($i, 1);
      };
    $rbuffer = rbufchars ($i, $gendp1, \$$chartype, $wsi);

    if ($wsi ne '') {#different workspace
      $Awfif::memes-> {currentwsbi} = $cwsi;
      };

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("dnamecharsx chartype $$chartype ret $rbuffer\n");
      };
    return $rbuffer
    }# dnamechars
#
#
sub lbevaluator1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($sponsor, $signal, $schema, $found, $file, $spi, $logst,
    $grkwp, $grkwpr, $status, $cdn, $cdnx);
#
# checked for merged workspaces

    $cdn = igetcontext ($myli, \$cdnx, \$sponsor, \$signal, \$schema, \$grkwp, \$grkwpr);
    $found = '';
# rework will be processed in real evaluator

# setup the global temporary file buffer for use by the builder which should free it (delsp)
    if (($status == 0 ) && (($spi = addsp ($sponsor)) != 0)) {# got buffer

      &initarray ($Awfif::aspl-> {l}[$spi][2]);
      $Awfif::aspl-> {l}[$spi][3] = 0;#no records yet
      &includesource (
        $file,
        \@{$Awfif::aspl-> {l}[$spi][2]},
        \$Awfif::aspl-> {l}[$spi][3]
        );
      $logst = 'lbe'.$Awfif::aspl-> {l}[$spi][3];
      &updatelog ($myli,'ae', 3, $logst);#only indication of problems is 0 records!
      if ($Awfif::aspl-> {l}[$spi][3] > 0) {#lets process the temporary buffer

        &updatelog ($myli,'ae', 5, $file);
        $Awfif::clp = ();
        $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
        $Awfif::clp-> {urgency} = ($Awfif::codelet-> {l} [$myli][3] * $Awfif::memes-> {blaunchm});
        if (defined ($Awfif::codelet-> {l}[$myli][19])) {

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

          $Awfif::clp-> {wsi} = $Awfif::memes-> {currentwsbi};
          };
        $Awfif::clp-> {strategy} = "lbbuilder";
        $Awfif::clp-> {action}-> {sponsor} = $sponsor;
        $Awfif::clp-> {action}-> {signal} = $Awfif::codelet-> {l} [$myli][16];
        $Awfif::clp-> {action}-> {schema} = $Awfif::codelet-> {l} [$myli][18];
        $Awfif::clp-> {action}-> {ref} = $spi;
# lbessgwsu1
        $Awfif::clp-> {action}-> {ssgws} = $Awfif::codelet-> {l}[$myli][19];#stream specifying group's workspace
        $Awfif::clp-> {action}-> {ssgoid} = $sponsor;#stream specifying group's oid
        &cdsubmitcodelet ($myli, \$Awfif::clp);
        if ($Awfif::memes-> {trace} == $Awfif::memes-> {tracetime}) {

          $Awfif::memes-> {activationchange} [ $Awfif::memes-> {currentwsbi} ] = 1;# force time trace trap
          };
        }
      elsif ($Awfif::memes-> {waitforuserinput}){#the key memetic stream that is to be tested can not be loaded

        print ("no file to work with\n");
        while ($Awfif::memes-> {waitforuserinput}){

          &break ();
          };#while
        };#else
      };#got buffer

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# lbevaluator1

#
sub lbbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($sponsor, $asponsor, $signal, $schema, $found, $spi, $ssgws, $ssgoid, $buffer, $insymbol, @inmsymbol,
    $grkwp, $grkwpr, @started, $end, $depstag, $depttag, $dephtag, $cdn, $cdnx, $setwsclinv);
#
# updated for merged workspaces

    $cdn = clogstat (\$cdnx);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdn myli $myli ");
      &itcpoutput ($myli);
      };
# groups must use the full workspace

    $grkwp = $Awfif::wsbl-> {wsbloh}[$Awfif::memes-> {currentwsbi}];
    $grkwpr = $Awfif::wsbl-> {wsot}[$Awfif::memes-> {currentwsbi}];
    $found = '';
    $started[0] = 0;
    $started[1] = 't';
    $end = '';
    $depstag = '';
    $depttag = 0;
    $dephtag = 0;
    $sponsor = $Awfif::codelet-> {l} [$myli][17];
    $asponsor = awsoadr ($sponsor);
    $signal = $Awfif::codelet-> {l} [$myli][16];
    $schema = $Awfif::codelet-> {l} [$myli][18];
    $setwsclinv = '';

#check if the work has already been done
    if (!findbond ($Awfif::wsol-> {l} [$asponsor] [2], $sponsor, $Awfif::memes-> {snnh} {opencategory}, $Awfif::memes-> {snnh} {loadbuffer})
# spi references the global temporary file buffer for use by the builder which should free it (delsp)
    && (($spi = $Awfif::codelet-> {l} [$myli][4]) != 0)
# lbbssgwsu1
    && (($ssgws = $Awfif::codelet-> {l} [$myli][5]) != 0)
    && (($ssgoid = $Awfif::codelet-> {l} [$myli][6]) != 0)
    ) {# got buffer
      my ($wsi, $sgmrecs, $stwso, $astwso, $attribs);
      $insymbol = '';
      @inmsymbol = ();
# setup a workspace for the deployment

      $wsi = setupws();
      $Awfif::wsbl-> {wsactive}[$wsi] = '';#this workspace will not be processed by coderack
# record the ws index
      $Awfif::aspl-> {ws} [$spi] = $wsi;
# lbbuiinfst
# inform the controlling statement

      $stwso = getmystatement ($myli, $sponsor, $grkwp, $grkwpr);
      $astwso = awsoadr ($stwso);
      $attribs = addattrib ($Awfif::memes-> {snnh} {attribs},'');
      &addattrib ($Awfif::memes-> {snnh} {attrib}, $Awfif::memes->{snnh}{stream}, '');
      &addattrib ($Awfif::memes-> {snnh} {attrib}, $wsi, '');
# lbbssgwsu2
      &addattrib ($Awfif::memes-> {snnh} {attrib}, $ssgoid, '');
      &addattrib ($Awfif::memes-> {snnh} {attrib}, $ssgws, '');
      &addattrib ($Awfif::memes-> {snnh} {attribe},'');
      $Awfif::wsol-> {l} [$astwso][2]
        = setupdesc ( $Awfif::memes-> {snnh} {attrib},
            ($Awfif::memes-> {snnh} {wsi} + $attribs),
            $Awfif::memes-> {snnh} {stream},
            $Awfif::wsol-> {l} [$astwso][2],
            $astwso);

      foreach $buffer (@{$Awfif::aspl-> {l}[$spi][2]}) {
        &convbws ($myli, \$buffer, \$grkwp, $grkwpr, $Awfif::memes-> {kwmi}, $Awfif::memes-> {kwmir}, $sponsor, \$insymbol, \@inmsymbol, \@started, \$end, \$depstag, \$depttag, \$dephtag, $wsi, $Awfif::memes-> {snnh} {operon}, $Awfif::memes-> {allwsstr},
          't', #energize the base types
          \$setwsclinv
          );
        };#transform the file into work space objects

      $Awfif::wsbl-> {wsft} [$wsi] = setfwst ($Awfif::wsbl->{wsoh}[$wsi], $Awfif::wsbl->{wsot}[$wsi], $wsi);
      &Awfif::stripichar ($Awfif::wsbl->{wsoh}[$wsi], $wsi);

      $Awfif::wsol-> {l} [$asponsor][2]
        = setupdesc ( $Awfif::memes-> {snnh} {opencategory},
            ($Awfif::memes-> {snnh} {wsi} + $sponsor),
            $Awfif::memes-> {snnh} {loadbuffer},
            $Awfif::wsol-> {l} [$asponsor][2],
            $asponsor);


      $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} + $Awfif::memes-> {batp};
# send activation to the involved Slipnet nodes
      &actnodes ( $Awfif::memes-> {snnh} {opencategory}, $Awfif::memes-> {openatype});
      &actnodes ( $Awfif::memes-> {snnh} {wsi}, $Awfif::memes-> {openato});
      &invcaches (wsbasetype ($sponsor));
      &freesp ($spi);# release the file buffer

      $Awfif::wsbl->{sgmfile} = ();
      $sgmrecs = 0;
      &Awfif::includesource (
        'memes/awfmem01.html',
        \@{$Awfif::wsbl->{sgmfile}},
        \$sgmrecs
        );
      $insymbol = '';
      @inmsymbol = ();
# seems like convbws should start afresh on this buffer
      $started[0] = 0;
      $started[1] = 't';
      $end = '';
      $depstag = '';
      $depttag = 0;
      $dephtag = 0;
      $setwsclinv = '';
# lbbuildernws
# setup a nuclear workspace for the deployment
      $wsi = setupws();
      $Awfif::wsbl-> {wsactive}[$wsi] = '';#this workspace will not be processed by coderack
# record the ws index
      $Awfif::aspl-> {nws} [$spi] = $wsi;
      foreach $buffer (@{$Awfif::wsbl->{sgmfile}}) {

        &Awfif::convbws ($myli, \$buffer, \$grkwp, $grkwpr, $Awfif::memes-> {kwmi}, $Awfif::memes-> {kwmir}, $sponsor, \$insymbol, \@inmsymbol, \@started, \$end, \$depstag, \$depttag, \$dephtag, $wsi, $Awfif::memes-> {snnh} {operon}, $Awfif::memes-> {allwsstr},
          '', #don't energize the base types
          \$setwsclinv
          );
        };#transform the file into work space objects

# lbbuildernu01
# include the memetic updates
      $Awfif::wsbl->{sgmfile} = ();
      $sgmrecs = 0;
      &Awfif::includesource (
        'memes/awfmeu01.html',
        \@{$Awfif::wsbl->{sgmfile}},
        \$sgmrecs
        );
      $insymbol = '';
      @inmsymbol = ();
# seems like convbws should start afresh on this buffer
      $started[0] = 0;
      $started[1] = 't';
      $end = '';
      $depstag = '';
      $depttag = 0;
      $dephtag = 0;
      $setwsclinv = '';
# record the ws index
      $Awfif::aspl-> {nws} [$spi] = $wsi;
      foreach $buffer (@{$Awfif::wsbl->{sgmfile}}) {

        &Awfif::convbws ($myli, \$buffer, \$grkwp, $grkwpr, $Awfif::memes-> {kwmi}, $Awfif::memes-> {kwmir}, $sponsor, \$insymbol, \@inmsymbol, \@started, \$end, \$depstag, \$depttag, \$dephtag, $wsi, $Awfif::memes-> {snnh} {operon}, $Awfif::memes-> {allwsstr},
          '', #don't energize the base types
          \$setwsclinv
          );
        };#transform the file into work space objects

      $Awfif::wsbl-> {wsft} [$wsi] = setfwst ($Awfif::wsbl->{wsoh}[$wsi], $Awfif::wsbl->{wsot}[$wsi], $wsi);
      &Awfif::stripichar ($Awfif::wsbl->{wsoh}[$wsi], $wsi);
      };#got buffer
# record the association between file and ws stream

    $Awfif::wsol-> {l} [$asponsor][2]
    = setupdesc ( $Awfif::memes-> {snnh} {stream},
        ($Awfif::memes-> {snnh} {wsi} + $Awfif::aspl-> {ws} [$spi]),
        $Awfif::memes-> {snnh} {associative},
        $Awfif::wsol-> {l} [$asponsor][2],
        $asponsor);

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# lbbuilder1
#
#<!-- start tag scl -->
#
sub ilbtonws {
    my ($myli, $pathname, $apathname, $activews, $grkwp, $grkwpr) = @_;
    my ($sponsor, $end, $cwsbi, $depstag, $depttag, $dephtag, $wsi, $sgmrecs, $setwsclinv, $insymbol, $buffer);
    my (@started, @inmsymbol);
#
# load nuclear workspace from file pathname [+ apathname]

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ilbtonws myli $myli pathname($pathname) activews($activews) ");
      if (defined ($apathname)){
        print ("apathname($apathname) ");
        };#if
      &itcpoutput ($myli);
      };
# groups must use the full workspace

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $sponsor = $Awfif::codelet-> {l} [$myli][17];

    $Awfif::wsbl->{sgmfile} = ();
    $sgmrecs = 0;
    &Awfif::includesource (
      $pathname,
      \@{$Awfif::wsbl->{sgmfile}},
      \$sgmrecs
      );
    $insymbol = '';
    @inmsymbol = ();
    $started[0] = 0;
    $started[1] = 't';
    $end = '';
    $depstag = '';
    $depttag = 0;
    $dephtag = 0;
    $setwsclinv = '';
# setup a nuclear workspace for the deployment
    $wsi = setupws();
    $Awfif::wsbl-> {wsactive}[$wsi] = $activews;#define if this workspace will be processed by the coderack
    foreach $buffer (@{$Awfif::wsbl->{sgmfile}}) {

      &Awfif::convbws ($myli, \$buffer, \$grkwp, $grkwpr, $Awfif::memes-> {kwmi}, $Awfif::memes-> {kwmir}, $sponsor, \$insymbol, \@inmsymbol, \@started, \$end, \$depstag, \$depttag, \$dephtag, $wsi, $Awfif::memes-> {snnh} {operon}, $Awfif::memes-> {allwsstr},
        '', #don't energize the base types
        \$setwsclinv
        );
      };#transform the file into work space objects

    if (defined ($apathname)){
# include the memetic updates

      $Awfif::wsbl->{sgmfile} = ();
      $sgmrecs = 0;
      &Awfif::includesource (
        $apathname,
        \@{$Awfif::wsbl->{sgmfile}},
        \$sgmrecs
        );
      $insymbol = '';
      @inmsymbol = ();
# seems like convbws should start afresh on this buffer
      $started[0] = 0;
      $started[1] = 't';
      $end = '';
      $depstag = '';
      $depttag = 0;
      $dephtag = 0;
      $setwsclinv = '';
      foreach $buffer (@{$Awfif::wsbl->{sgmfile}}) {

        &Awfif::convbws ($myli, \$buffer, \$grkwp, $grkwpr, $Awfif::memes-> {kwmi}, $Awfif::memes-> {kwmir}, $sponsor, \$insymbol, \@inmsymbol, \@started, \$end, \$depstag, \$depttag, \$dephtag, $wsi, $Awfif::memes-> {snnh} {operon}, $Awfif::memes-> {allwsstr},
          '', #don't energize the base types
          \$setwsclinv
          );
        };#transform the file into work space objects
      };#if aux update file

    $Awfif::wsbl-> {wsft} [$wsi] = setfwst ($Awfif::wsbl->{wsoh}[$wsi], $Awfif::wsbl->{wsot}[$wsi], $wsi);
    &Awfif::stripichar ($Awfif::wsbl->{wsoh}[$wsi], $wsi);
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("ilbtonws ret ($wsi)\n");
      };
    return $wsi
    }# ilbtonws
#
#<!-- end tag scl -->
#
sub desrasstevaluator1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
# describe resolved assume streams

    &icsevaluator1 ($myli, \&Awfif::idesrasstevaluator1, 'desrasstbuilder', $kwp, $kwpr, \@$sactset);
    }# desrasstevaluator1
#
sub idesrasstevaluator1 {
    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);
#
# describe resolved assume streams
# checked for merged workspaces

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $dolaunch = '';
    $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 ("idesrasstevaluatorx ret ($dolaunch)\n");
      };
    return $dolaunch
    }# idesrasstevaluator1
#
sub desrasstbsmodeler1 {
    my ($myli, $kwp, $kwpr, $sactset, $and) = @_;
    my ($salience);
# describe resolved assume streams

    $salience = ievalbsmodeler1 ($myli, \$$kwp, $kwpr, \@$sactset, \$$and, 'idesrasstevaluator');
    $$and = 't';
    return $salience
    }# desrasstbsmodeler1
#
sub desrasstbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture

    my ($desc2, $desc3, $desc4, $desc12, $desc13, $desc14);
    my ($sponsor, $asponsor, $signal, $schema, $found, $bcount, $swstype, $noswstype, $cwsbi, $bcexists,
    $grkwp, $grkwpr, $cdn, $cdnx);
#
# describe resolved assume streams
# checked for merged workspaces
# wait for {model}-({resolved})-> {completed} descriptor and then issue and support schematic signal

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $found = '';
    $bcount = 0;
    $noswstype = 't';
    $bcexists = '';
    $desc2 = $Awfif::memes-> {snnh} {completed};
    $desc3 = $Awfif::memes-> {snnh} {resolved};
    $desc4 = $Awfif::memes-> {snnh} {model};
    $desc12 = $Awfif::memes-> {snnh} {wait};
    $desc13 = $Awfif::memes-> {snnh} {desrasstevaluator};
    $desc14 = $Awfif::memes-> {snnh} {cwaitondesc};

    if (getcontext ($myli, \$sponsor, \$signal, \$schema, \$swstype, \$grkwp, \$grkwpr, $noswstype, \$cdn, \$cdnx, 4)) {

      my ($stwso, $astwso, $giveup);
      my ($atelhwso, $usetrans, $f1transid, $f1trmgrid, $transtatus, $transid, $stransmgrid, $samesubpid, $reportcaspart, $jhlabeli, $jhlabeloi);

      $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);
# check if we are sponsoring cascade members
      $usetrans = chstoff1 ($myli, $sponsor, $kwp, $kwpr, \@$sactset, \$f1transid, \$f1trmgrid, \$transtatus, \$transid, \$stransmgrid, \$samesubpid, \$reportcaspart);

      my ($counteri, $codeletdef);

      if (($usetrans == 0)
      ){#Transition the cycle phase

        my ($pws, $pdcawso, $e2ftwso, $ae2ftwso, $notcompleted);
        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) {

          $bcount = ifindb ($myli, $stwso, 'e2finhibb', \$sigcount, \@lomatchs, \@lola, \@loconcs, \@lostrts, \@loends, \@logb, \@loge, $$kwp, $kwpr, \@$sactset, $pws);
          $e2ftwso = getstsbws ($myli, $sigcount, \@lomatchs, \@lola, $pws);
          if ($bcount == 1) {#check for the desc4 desc3 desc2 descriptor

            $Awfif::memes-> {currentwsbi} = $pws;
            $ae2ftwso = awsoadr ($e2ftwso);
            if (!(findcounter ($Awfif::wsol-> {l} [$ae2ftwso][2], $desc4, \$counteri, $desc2, $desc3))
            ){#note that need to/issued wait

              $notcompleted = 't';
              if ( ((!findcounter ($Awfif::wsol-> {l} [$asponsor][2], ($desc14), \$counteri, $desc12, $desc13)))
              ){

                &waitondesc ($myli, $ae2ftwso, ($desc2 + $Awfif::memes-> {snnh} {wsi}), $desc3, $desc4, undef(), undef(), undef(), undef(), \$codeletdef);
                $Awfif::wsol-> {l} [$asponsor][2]
                = inccounter ( $desc13,
                    ($Awfif::memes-> {snnh} {wsi} + $desc12), #
                    $desc14,
                    $Awfif::wsol-> {l} [$asponsor] [2],
                    $asponsor,
                    '',
                    $desc13,
                    $desc12);
                };#if
              };#if
            };#if e2f operon exists
          };#if pdca workspace exists

        if (($notcompleted)
        ){

# remove any transaction sponsorship
          if ($Awfif::codelet-> {l} [$myli] [35] > 0) {#

            &transalloc ($myli, $Awfif::memes-> {snnh} {casparticipant}, undef(), $Awfif::codelet-> {l} [$myli] [35], \$$transtatus);
            };#if
          }#if not completed
        else {#wait condition completed
# desrasstbinitregu1
# can initialise the stream description regulatory structure

          if ((defined($Awfif::memes-> {desrasstarsb})) && ($Awfif::memes-> {desrasstarsb} eq $cdn)) {&break()};#if match callers name break

          if ((findcounter ($Awfif::wsol-> {l} [$asponsor][2], ($desc14), \$counteri, $desc12, $desc13))
          ){

            &maskcounter ($desc14, $asponsor, $desc12, $desc13);
            };#if
# desrasstbcstb

          $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$myli][20];

          $transtatus = 0;#must be defined to be set in ilaunchnc
          &ilaunchnc ($myli, $stwso, 'casoppi', $Awfif::memes-> {snnh} {ecyclin}, \$giveup, $grkwp, $grkwpr, \@$sactset,
            '32,37', #mask out codelet-> {l} [32] i.e. {tfree}
            $usetrans,
            \$transid,
            \$transtatus,
            $Awfif::codelet-> {l} [$myli][36],
            \$jhlabeli,
            \$jhlabeloi
            );
          &transmgr ($myli, $myli, $Awfif::memes-> {snnh} {update}, $Awfif::memes-> {snnh} {assoctran}, $asponsor, $Awfif::memes-> {snnh} {stran}, $transid, $Awfif::codelet-> {l} [$myli] [36], $stransmgrid);
          if ($Awfif::codelet-> {l} [$myli] [36] != 0) {

            &transmgr ($myli, $myli, $Awfif::memes-> {snnh} {add}, $Awfif::memes-> {snnh} {assocf1}, $atelhwso, $Awfif::memes-> {snnh} {rtran}, undef(), $Awfif::codelet-> {l} [$myli] [36], $Awfif::codelet-> {l} [$myli] [37], $Awfif::codelet-> {l} [$myli] [36]);
            };#if
          };#else
        }#if
      elsif ($usetrans > 0) {

        $usetrans = resstoff1 ($myli, $sponsor, $kwp, $kwpr, \@$sactset, 'casoppi', $usetrans, \$f1transid, \$f1trmgrid, \$transtatus, \$transid, \$stransmgrid, \$samesubpid, \$reportcaspart, \$jhlabeli, $jhlabeloi);
        };#elsif
# desrasstbngcu1

      if (($transtatus == $Awfif::memes-> {snnh} {incomplete})
      ){

        my ($sgdi, $gsponsor);
        $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$myli] [20];
        &fgrpd ($myli, $sponsor, \$sgdi, $Awfif::memes->{snnh}{groupcategory});
        $gsponsor = fgrpsponsor ($sponsor, $Awfif::workspace-> {l} [$sgdi] [3], $Awfif::memes-> {snnh} {groupcategory});
        ¬gcompleted ($myli, $gsponsor, undef(), 't', undef (), undef(),);
        };#if
      };#got target wso

    $Awfif::memes-> {currentwsbi} = $cwsbi;
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# desrasstbuilder1
#
#<!-- start tag scc -->
#
sub iwaitarelays {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($sponsor, $asponsor, $signal, $schema, $found, $bcount, $swstype, $noswstype, $cwsbi, $bcexists,
    $grkwp, $grkwpr, $cdn, $cdnx);
#
# wait for descriptor and then issue (relay) and support schematic signal
# checked for merged workspaces

    $cwsbi = $Awfif::memes-> {currentwsbi};

    $found = '';
    $bcount = 0;
    $noswstype = 't';
    $bcexists = '';

    if (getcontext ($myli, \$sponsor, \$signal, \$schema, \$swstype, \$grkwp, \$grkwpr, $noswstype, \$cdn, \$cdnx, 4)) {

      my ($stwso, $astwso, $giveup);
      my ($atelhwso, $usetrans, $f1transid, $f1trmgrid, $transtatus, $transid, $stransmgrid, $samesubpid, $reportcaspart, $jhlabeli, $jhlabeloi);

      $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);
# check if we are sponsoring cascade members
      $usetrans = chstoff1 ($myli, $sponsor, $kwp, $kwpr, \@$sactset, \$f1transid, \$f1trmgrid, \$transtatus, \$transid, \$stransmgrid, \$samesubpid, \$reportcaspart);

# my ($sigcount, @lomatchs, @lola, @loconcs, @lostrts, @loends, @logb, @loge, $e2ftwso);

      my ($counteri, $codeletdef);

      if (($usetrans == 0)
      ){#Transition the cycle phase
# iwaitarelayscu1

        my (@swait, $warws, $awarwso, $warbwso, $awarbwso, $i, $notcompleted);
        @swait = warfindops ($myli, $stwso, \$warws, \$warbwso, \@$sactset);
        for ($i = 1; $i <= $swait [0]; $i++){# check that each schematic strucuture has a completion descriptor

          $Awfif::memes-> {currentwsbi} = $warws;
          $awarbwso = awsoadr ($warbwso);
          $awarwso = awsoadr ($swait[$i]);
# while there is no completed resolved model wait for one
          if (!(findcounter ($Awfif::wsol-> {l} [$awarwso][2], $Awfif::memes-> {snnh} {model}, \$counteri, $Awfif::memes-> {snnh} {completed}, $Awfif::memes-> {snnh} {waitarelay}))
          ){#note that need to/issued wait

            $notcompleted = 't';
            if ( ((!findcounter ($Awfif::wsol-> {l} [$awarbwso][2], ($Awfif::memes-> {snnh} {cwaitondesc}), \$counteri, $i, $Awfif::memes-> {snnh} {waitarelay})))
            ){

              &waitondesc ($myli, $awarwso, ($Awfif::memes-> {snnh} {completed} + $Awfif::memes-> {snnh} {wsi}), $Awfif::memes-> {snnh} {waitarelay}, $Awfif::memes-> {snnh} {model}, undef(), undef(), undef(), undef(), \$codeletdef);
              $Awfif::wsol-> {l} [$awarbwso][2]
              = inccounter ( $Awfif::memes-> {snnh} {waitarelay},
                  ($Awfif::memes-> {snnh} {wsi} + $i), #each schematic operon
                  $Awfif::memes-> {snnh} {cwaitondesc},
                  $Awfif::wsol-> {l} [$awarbwso] [2],
                  $awarbwso,
                  '',
                  $Awfif::memes-> {snnh} {waitarelay},
                  $i);
              };#if
            };#if
          };#for

        if (($notcompleted)
        ){

# remove any transaction sponsorship
          if ($Awfif::codelet-> {l} [$myli] [35] > 0) {#

            &transalloc ($myli, $Awfif::memes-> {snnh} {casparticipant}, undef(), $Awfif::codelet-> {l} [$myli] [35], \$$transtatus);
            };#if
          }#if not completed
        else {#wait condition completed
# waitarelaybinitregu1
# can initialise the stream description regulatory structure

          if (($Awfif::memes-> {iwaitarsb}) && ($Awfif::memes-> {iwaitarsb} eq $cdn)) {&break()};#if match callers name break
          for ($i = 1; $i <= $swait [0]; $i++){# mask the wait issued descriptor

            if ((findcounter ($Awfif::wsol-> {l} [$awarbwso][2], ($Awfif::memes-> {snnh} {cwaitondesc}), \$counteri, $i, $Awfif::memes-> {snnh} {waitarelay}))
            ){

              &maskcounter ($Awfif::memes-> {snnh} {cwaitondesc}, $awarbwso, $i, $Awfif::memes-> {snnh} {waitarelay});
              };#if
            };#for

          $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$myli][20];

          $transtatus = 0;#must be defined to be set in ilaunchnc
          &ilaunchnc ($myli, $stwso, 'casoppi', $Awfif::memes-> {snnh} {ecyclin}, \$giveup, $grkwp, $grkwpr, \@$sactset,
            '32,37', #mask out codelet-> {l} [32] i.e. {tfree}
            $usetrans,
            \$transid,
            \$transtatus,
            $Awfif::codelet-> {l} [$myli][36],
            \$jhlabeli,
            \$jhlabeloi
            );
          &transmgr ($myli, $myli, $Awfif::memes-> {snnh} {update}, $Awfif::memes-> {snnh} {assoctran}, $asponsor, $Awfif::memes-> {snnh} {stran}, $transid, $Awfif::codelet-> {l} [$myli] [36], $stransmgrid);
          if ($Awfif::codelet-> {l} [$myli] [36] != 0) {

            &transmgr ($myli, $myli, $Awfif::memes-> {snnh} {add}, $Awfif::memes-> {snnh} {assocf1}, $atelhwso, $Awfif::memes-> {snnh} {rtran}, undef(), $Awfif::codelet-> {l} [$myli] [36], $Awfif::codelet-> {l} [$myli] [37], $Awfif::codelet-> {l} [$myli] [36]);
            };#if
          };#else
        }#if
      elsif ($usetrans > 0) {

        $usetrans = resstoff1 ($myli, $sponsor, $kwp, $kwpr, \@$sactset, 'casoppi', $usetrans, \$f1transid, \$f1trmgrid, \$transtatus, \$transid, \$stransmgrid, \$samesubpid, \$reportcaspart, \$jhlabeli, $jhlabeloi);
        };#elsif

      if (($transtatus == $Awfif::memes-> {snnh} {incomplete})
      ){

        my ($sgdi, $gsponsor);
        $Awfif::memes-> {currentwsbi} = $Awfif::codelet-> {l} [$myli] [20];
        &fgrpd ($myli, $sponsor, \$sgdi, $Awfif::memes->{snnh}{groupcategory});
        $gsponsor = fgrpsponsor ($sponsor, $Awfif::workspace-> {l} [$sgdi] [3], $Awfif::memes-> {snnh} {groupcategory});
        ¬gcompleted ($myli, $gsponsor, undef(), 't', undef (), undef(),);
        };#if
      };#got target wso

    $Awfif::memes-> {currentwsbi} = $cwsbi;
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# iwaitarelays
#
#<!-- end tag scc -->
#
sub dcrdowarsevaluator1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
# wait for descriptor and then issue (relay) and support schematic signal

    &icsevaluator1 ($myli, \&Awfif::idcrdowarsevaluator1, 'dcrdowarsbuilder', $kwp, $kwpr, \@$sactset);
    }# dcrdowarsevaluator1
#
sub idcrdowarsevaluator1 {
    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);
#
# wait for descriptor and then issue (relay) and support schematic signal
# checked for merged workspaces

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $dolaunch = '';
    $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 ("idcrdowarsevaluatorx ret ($dolaunch)\n");
      };
    return $dolaunch
    }# idcrdowarsevaluator1
#
sub dcrdowarsbsmodeler1 {
    my ($myli, $kwp, $kwpr, $sactset, $and) = @_;
    my ($salience);
# wait for descriptor and then issue (relay) and support schematic signal

    $salience = ievalbsmodeler1 ($myli, \$$kwp, $kwpr, \@$sactset, \$$and, 'idcrdowarsevaluator');
    $$and = 't';
    return $salience
    }# dcrdowarsbsmodeler1
#
sub dcrdowarsbuilder1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($cws, $bcwso);
# deploy case resolved do phase completing wait and relay codelet

    $bcwso = getbcompcontext ($myli, \$cws, 'binderrc');
    &bindhistone ($myli, $cws, $bcwso);

    &iwaitarelays ($myli, \$$kwp, $kwpr, \@$sactset);
    }# dcrdowarsbuilder1
#
#
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
#
#<!-- start tag ssc -->
#
sub statementscout1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($ni,
    $grkwp, $grkwpr, $cdn, $cdnx, $giveup, $tinstances, $found, $cwsbi);
#
# checked for merged workspaces

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $cdn = clogstat (\$cdnx);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdn myli $myli ");
      &itcpoutput ($myli);
      };
# statements must use the full workspace

    $grkwp = $Awfif::wsbl->{wsoh}[$Awfif::memes->{currentwsbi}];
    $grkwpr = $Awfif::wsbl->{wsft}[$Awfif::memes->{currentwsbi}];
# Ensure all parts exist if to go forward

    if ((allpartsconstrained ($myli, \$giveup, $grkwp, $grkwpr, \@$sactset))
    && (!$giveup)
    && ($found = selsalwsitem ($myli, \$ni, \$tinstances, $grkwp, $grkwpr, \@$sactset, 'bustatement'))
    && ($ni > 0) ) {
      $Awfif::codelet-> {l}[$myli][4] = $ni;# updatelog needs this setup
# if the statement is not complete call in an evaluator
      if (!findbond ($Awfif::wsol-> {l} [ awsoadr ($ni)] [2], $ni, $Awfif::memes->{snnh}{complete}, $Awfif::memes-> {snnh} {statementcategory})) {

        &updatelog ($myli,'ps',4, $ni);
# & call in a statement evaluator
        $Awfif::clp = ();
        $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
        $Awfif::clp-> {urgency} = $Awfif::memes-> {parteu};
        if (defined ($Awfif::codelet-> {l}[$myli][19])) {
          $Awfif::clp-> {wsi} = $Awfif::codelet-> {l}[$myli][19];
          }#wsi set
        else {
          $Awfif::clp-> {wsi} = $Awfif::memes-> {currentwsbi};
          };
        $Awfif::clp-> {strategy} = "statementevaluator";
        $Awfif::clp-> {bond}-> {ni} = $ni;
        &cdsubmitcodelet ($myli, \$Awfif::clp);
        };#got part
      }# got a statement to work on
    elsif ($giveup) {# terminate statement processing

      print ("badly formed statement - moving to next file\n");
      &actnodes ($Awfif::memes-> {snnh} {terminate}, $Awfif::memes-> {actmax});
      &invcaches ($Awfif::memes-> {snnh} {terminate});
      };
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# statementscout1
#
sub statementevaluator1 {
    my ($myli, $kwp, $kwpr, $sactset) = @_;#The ignored parameters are required by the codelet calling architecture
    my ($ni,
    $grkwp, $grkwpr, $cdn, $cdnx, $cwsbi);
#
# checked for merged workspaces

    $cwsbi = $Awfif::memes-> {currentwsbi};
    $cdn = clogstat (\$cdnx);
    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdn myli $myli ");
      &itcpoutput ($myli);
      };
# statement must use the full workspace

    $grkwp = $Awfif::wsbl->{wsoh}[$Awfif::memes->{currentwsbi}];
    $grkwpr = $Awfif::wsbl->{wsft}[$Awfif::memes->{currentwsbi}];
# get a salient statement 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, $Awfif::memes->{snnh}{complete}, $Awfif::memes-> {snnh} {statementcategory})) {

        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} {reqmissing}, wsbasetype ($ni), $Awfif::memes-> {snnh} {model}))
        ){
# atppenalty3

          $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} - $Awfif::memes-> {failatpr};
          };#if
# if the statement part is structurally sound & development is whole call in a builder

          $Awfif::clp = ();
          $Awfif::clp-> {log} = $Awfif::codelet-> {l} [$myli][13];
          $Awfif::clp-> {urgency} = ($Awfif::codelet-> {l} [$myli][3] * $Awfif::memes-> {blaunchm});
          if (defined ($Awfif::codelet-> {l}[$myli][19])) {
            $Awfif::clp-> {wsi} = $Awfif::codelet-> {l}[$myli][19];
            }#wsi set
          else {
            $Awfif::clp-> {wsi} = $Awfif::memes-> {currentwsbi};
            };
          $Awfif::clp-> {strategy} = "statementbuilder";
          $Awfif::clp-> {bond}-> {ni} = $ni;
          &cdsubmitcodelet ($myli, \$Awfif::clp);
          }#got whole statement
        else {

          $Awfif::memes-> {fatp} = $Awfif::memes-> {fatp} - $Awfif::memes-> {failatpr};
          if ($Awfif::memes-> {fatp} <= 0) {

            &break ();
            };#if
          };#else
        };#statement is not whole yet
      }# statement present to work on
    $Awfif::memes-> {currentwsbi} = $cwsbi;

    if ($Awfif::memes-> {trace} > $Awfif::memes-> {traceentry}) {
      print ("$cdnx\n");
      };
    &clogstatx ();
    }# statementevaluator1
#
#<!-- start tag inh -->
#<!-- 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 -->
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