Ioflo

Latest version: v2.0.2

Safety actively analyzes 634645 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 17 of 17

0.5.2

-- Removed.done as attribute of task. NOw attribute of framer
Fixed task runners
Changed done need. and completion action

-- Refactored module and package so that can add deed files without redoing all
imports pacage Behaving

-- Got rid of Transact and Trunact classes made new actors
that has needs and far or aux s parms (better)
Transiter
Suspender
used .done as flag to determine if Suspender has beed activated (cond aux)


-- Added a function to recursively set the debug variable
for nested modules in packages such as behaving.arbiting etc
new nested deeds breaks testing.Test debug option

-- Removed implicit Framer actions

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

0.5.0

-- Put precur and transacts and truncacts all in precur context
precurs don't return anything and trans act only return something if
valid tansition so if act does not return anything keep going so
if doesn't matter mixed types of acts in one list.

-- added in order option (in front mid back) to task commands framer server logger
This is useful when multiple houses to synchronize sensor state before
controllers run in case of inter house communication.

-- Added 'me' as goto target,
me useful for new reenter context and forced re-entry

--------------
20090516

-- updated documentation and example scripts

--------------
20090515

-- Profiled fastest way to run for loops for iterating and for loop is
faster than either list comprehension or generator expression
for either actions or need actions (see speedIter.py in sandbox)

-- Got rid of update method for LapseDeed folded it back into action()
action() now calls updateLapse()

-- Change convention in framer.
.elapsed is attribute instead of elapsedTime
.elapsedShr is ref to share

.repeat is attribute instead of repeatCount
.repeatShr is ref to share

The actors deeds use .elapsed as share reference
framer is not action so its normal reference is to itself not the shares
whereas actions primarily modify shares not self


-- framer.stamp is now the time of the last outline change used to compute
.elapsed time

-- Now uses framer.stamp to replace startTime for starting elapsed time

-- logger and server uses task.stamp as time last ran successfully


-- replaced if registry.Names.has_key(name) with name in registry.Names

-- Got rid of framework command now only framer

-- got rid of "on need" form now only "if need"

-- Added Framer specific Frame Name Spaces
This prevents problem of inadvertently having two framers run the same frame
It also makes it easier to code auxiliaries since one can now reuse frame names
in different framers.

-- Added framer.human and frame.headHuman so print out correct human active outline
when a conditional auxiliary is active (truncated outline)--

-- Changed reenter to renter and reeexit to rexit contexts also changed
reenacts to renacts and reexacts to rexacts and reenter() reexit() to renter() rexit()
etc

-- Changed Registry.clear() .Clear() since subclasses
might have alternate meaning for clear().
Also since clear() is a class function it should be capitalized


--------------
20090514

-- Changed back scheduling of segueAuxes (see design notes)
segueAuxes is its own context

-- Changed Auxact class to Truncact class

-- Added forced reentry (see design notes) so that can do counters of aux iterations
all in one frame see mission counter4.tx also counter3.txt
This actually implements what the reenter reexit done the day before was
supposed todo but didn't see design notes

--------------
20090513

-- added support for [not] in need make it be at connective level
[not] need inverts logic

made a new Nact(Act) class that negates its actor() call
if not need then replaces act with nact


-- Added reenter and reexit contexts for retrans = targeted unconditional reentry
so can do counters that increment on entry not on recur.

A targeted re-entry occurs when an already active frame (that is any frame
in the active outline) is the explicit target of a successful transition.

In a targeted re-entry,
entry condition checks are not performed on the reentered frames
standard enter actions and exit actions are not fired (as is the current policy)
but reenter actions and reexit actions are fired

renacts
rexacts

reenter actions are performed on every targeted re-entry but not on initial entry
avoids conflict and deciding which one has priority (reenter vs enter)

reexit actions are performed on every targeted re-exit but not on final exit
avoids conflict and deciding which one has priority (reexit vs exit)


enter (initial)

trans
exit
enter

retrans
reexit
reenter

trans
exit
enter

exit (final)


But since rexit and reenter happen for the same frames at the same time
there is no difference except that reexit is bottom up order and reenter
is top down so reexit at higher level can override reexit at lower level
Odd that reexit before reenter since no initial reenter and no final reexit
So maybe should be reenter then reexit on retrans need use case to figure out.

See Design Notes for more discussion



--------------
20090512

-- added as scheduled (be inactive, active, slave) option to server, logger, task commands

-- Refactored tasker and house task lists
house now has tasks, framers, slaves, auxes
framers is all framers so can do resolve links

tasks has all tasks that are taskable (active, inactive) including loggers servers framers
slaves has all slave tasks including framers loggers servers
auxes has all aux framers

Put all .tasks from house into ready list.
when put active task in ready list set .desire to start
when put inactive task in ready list set .desire to stop

Got rid of stopped list

advantage of this is that execution order does not change if a task is stopped
and started

Modified runners so that .desire works

-- Changed go script to support -d debug option

-- made done command only apply to auxiliary framers. also on done need

-- added flush interval to logger command
default minimum is 1 second
logger basic at 0.0 flush 60.0

-- Added try finally to logger generator to make sure log files get closed if exception

-- Changed log command parms to
log name [to path] [as (text, binary)] [on rule]
default file name is log name and path is default
default is text
default is update
rule: (once, never, always, update, change) automatically log on rule condition
for manual forced logging use once or never as the auto condition and then tally
for forced logging

-- Added checks in builder to prevent adding server, logger, log, or loggee of
same name as existing one


-- Changed log files etc so house_date_time is directory holding files

open(filename, 'a+') won't create a directory or path that does not already
exist. will only create a file if the file does not already exit

use os.makedirs(path, mode = 0777)




----------------
20090511

-- Added print command to print to console the rest of the arguments
print Hello big buddy

-- tested conditional aux mission file test1.txt


-- Added conditional auxiliary as "interrupt" like mechanism where higher level framecan suspend
lower level frame actions that then resume where they were once the high level
suspension is over. If the condition is met the auxiliary becomes
active and the active outline is truncated at the main frame of the conditional auxiliary.
This effectively suspends the lower level frames (since outline truncated).
Complication is if even higher level frame performs a transition what happens
to truncated outline? Decided that it just becomes the new transition so not
truncated anymore unless the higher level frame is also doing a conditional
auxilary. So if want to stay within truncated outline then use
yet another conditional auxiliary at a higher level.
The purpose of this feature is to provide event driven exception handling or
safety jackets that attempt to repair a situation and then allow the mission
to resume. The conditional auxiliaries do the repair.
Another issue is the conditional auxiliary run until done always or only run
while the condition is still true? Or do we allow both?

Implemented run until done. run while A is the logical inverse
of run until not A. Once done if the condition needing repair is not repaired it
will try again. The drawback is the repair aux doesn't know apriori what the
repair condition was that activated it so it can't be done
as soon as the repair condition is satisfied.
It could have a different done condition than the originating condition

Syntax choices
if/on needs go aux

Like "go" one better as it matches more the truncated outline
you are going to the aux and running it ans pausing the existing outline

alternate is if needs run aux (not implemeted)

-----------------
20090507

-- Put back in framer.actives attribute and use it so can prepare for conditional
auxiliaries

-- Moved transition logic into Transact call method so can have different types of
transacts. Preparatory to conditional auxes

-- Got rid of Frame.marker and associated mark path methods not used anymore

-- HAF frame outline names for human display should use something else maybe
Also have issue of showing complete path but also indicating which frame
is the active frame
Want different from Data Store Share path names which use dot '.' separateor

group.group.share

With framer
framer<<superframe<superframe<activeframe>subframe>subframe

human without framer
superframe<superframe<activeframe>subframe>subframe

-- Added frame.traceHuman and .human to hold this human friengly string represention
of frame hierarchy


-----------------
20090506

-- Made it so if and on can be used for either entry conditions or transitions
figures out which by presence of goto

-- Added DynTransact (Transact) class. This has a new call method that
gets the far frame by looking for an attribute of the framer given by the
string for target goto last looks for framer.last getattr(frame.framer, 'last')
Needed new type of transact object that has dynamic far link that when
called looks up value in framer.last instead of resolving at parse build time.
if make attribute reference dynamic (getattr) then could do goto last goto first
any attribute of framer that pointed to frame
After testing this decided it didn't work because the elapsed time and repeat
gets reset when go back to last frame. So not really provide an 'Interrupt"
like capability Deciced to do something else. So took out the last support.

-- got rid of .last support


-- Added to goto target where target can be 'last' this creates a DynTransact
framer.last is the last frame before the current active frame. It is initialized and
changed by framer.activate

This is by default the last frame executed before the current frame
This is set to the near frame at the end of a transition from near to far before executing the entry actions
in the far frame. This reference maybe used as the target of a goto last

This enables returning from a transition to handle an error condition
like an interrupt. If the "interrupt handing takes more that one frame then the first frame has to run an aux
otherwise each subsequent frame with change last and there will be no way to return to the very first. without some
other mechanism.
(already did framer.last attribute and its gets set in .activate)


------------
20090502

-- Changed preacts to beacts

-- added preacts as prior transition actions to frame

-- eval preacts in framer just prior to transition trans

-- add precur command context to builder and add deed to this context when overridden


-- got rid of context command

-- Refactored Framer transition made trans for a frame something that is done from Frame not framer
so trans in Framer just iterates through list
-- Consider Refactor trans method of framer so can be encapsulated as Frame method
Idea is to refactor framer so that all Framer methods iterate over outline of frames
but work is done by associated Frame method (checkEnter, enter recur exit trans etc)

Problems are:
trans method which calls Framer methods.
implicit entry exit recur actions. These are stored in Framer
Added framer link to frame help overcome these problems.

Framer attributes .entries and .exits don't need to be globals but
can be parameters passed into associated methods that use them.
only need .actives
runner method no longer accesses .entries .exits or .actives all
handled with method calls.

Replaced self.actives with self.active.outline


-- replaced trans methods of framer and frame with segue

-- Replaced start command for framer with first command and
replaced start option in framer command with first option

-- temporary activation no longer done in checkStart

-- Added .last attribute of Framer to save last active frame before current active

-- Added deactivate method to framer

-- Got rid of reactivate method of framer

-----------------
20090429

interfacing.remusformatter.checksum did not pring leading zeros
changed %2X to %02X to fix

-----------
20090220

Fixed problem where if exception occurred in server recon remus that the socket
would not be closed and on next run the socket would be "in use"
added try finally to runner method of generator so finally would close
the socket in the event of an exception causing the generator to close.



---------------
20081112

-- added warnings at parse time if share or field does not exist
when created dynically for put, inc, copy, set, if, on

-- new addressing syntax in init put inc copy set if on commands

-- init command replaces share command

-- except for special goals and needs all basic goals and needs dynamic

-- added boolean need

-- added logic in init put inc copy set if on commands
to enforce that if data field is value then only one field is allowed
this will make it hard to inadvertently have a share with a value field and non
value fields



-----------
20081110

-- fixed store code to:
strip leading '.' on paths when adding
raise exception for blank groups a..b
make sure that Store.create(path) .add only allows one to create shares without
clobbering existing shares or groups when path collisions or overlap
example:

path1 a.b.c.d d is share
path2 a.b.c.d.e e is share

*creating path2 if path1 already exists will clobber share d of path1
so while descending path check that intermediate level is not a preexisting
share (since share acts like dictionary it will not cause error)

*creating path1 if path2 already exists will orphan share e of path2
so while descending path check that tail is not a preexisting group
group (part of preexisting path to lower level)

-- added copy command and IndirectPoke implements new format for
moving data between shares and HAFScript syntax



------------
20081024

-- completely redid need syntax and need parsing
need = (state comparison goal) c

added relative addressing
can now be framer or frame or house relative

redefined absolute addressing for state and goal
ie indirect goals allowed not just direct

added boolean need (no comparison or goal implicit comparison to True
if state
on state

changed where goals and state stored
goal.name
state.name
framer.framername.state.name
framer.framername.goal.name
frame.framename.state.name
frame.framename.goal.name

state is now thename for need not pose
changed behaviors to use state.xxx instead of pose.xxx

-- added dynamic goal creation if goal by name does not exist make new goal with name
what about value vs data goals?
change parse logic if one one more token after to connective then value goal
if two or more then data goal

Change syntax
make consistent so know if value or data goal based on if there is a field named value
already?


-- add dynamic need creation if need by name does not exit make new need with name
actially now all need specific info is in need parms so only need three basic types
boolean need, direct need, and indirect need, also have simple needs for elapsed and repeat
and special needs for done status always


----------
20081018

-- added context commands without context word
native enter recur exit

-- changed syntax of framework command
added be scheduled option aux and slaves must be explicitly defined
added start frame option
start frame is first lexical frame if not otherwise declared

-- added global ScheduleValues ScheduleNames and global constants
INACTIVE, ACTIVE, AUX, SLAVE

-- added task.schedule and removed .active .aux and .slave fixed up related
code.


----------
20081017
-- share (added from) so can initialize a given share from the value or data
in another share

share path as field value field value
share path as value value
share path as value
share path from path
(potentially ambiguous could be single or multiple and could change later)
so understand that only initializing share to preexisting share

share path from path value
share path from path field [field]

-- fixed bug in transition logic Framer staticmethod Uncommon would return as uncommon
the last frame as uncommon exit and entry if the outlines were equal fixed this

-- changed check enter logic so that entry fails if entries empty ie transition
from same outline to same outline. This would occur any time upper frame had
transition to a lower frame in outline but active frame was already the lower frame
Implications for mplicit entry actions

-- added framer link to frame so can refactor execution order code. Also makes
it so can't inadvertently assign frame to more than one framer at build time.

-- fixed problem with arbiter definition where truth was in data not share attribute

-- added framer command same as framework




-------------
20080605
-- change goal duration to goal elapsed so consistent goal and need same name

-- added support for counter per framer outline like elapsed so can count
times framer has run in a given state and then can do trans on count like
on elapsed This was done using the repeat need and the framer.repeatCount
also for logging see pose.repeat.framer.value




------------
20080602
-- added Flush time for logger default 60 seconds to flush logs

-------------
20080527

-- set convention scenario.onset for starting position north east relative to origin.
fscenario.origin lat lon for origin of flat earth coordinates

changed uuv and usv simulators to use scenario.onset instead of scenario.origin
origin is now lat lon of origin of coordinate system whereas onset is initial
position of the vehicle north east relative to origin.


-- Got rid of the first field mapping for value. In other words
mapping the first field created to value seems like a stupid idea since
never use it and even if did can't think of good use case where you would want
to. It was merely to prevent crashing if inadvertently used value when there
was none. Only use case would be if shares had only one field in data but
wanted that field to be something other than value like pose.heading.heading
but never did it that way always used value.
in hindsight may want to detect such inadvertant use as error.
still have share.value as property to get field named value if exits
Did this because as implemented, updating a share with share.update(value = xxx)
can mess up the way value works
since update() doesn't check to see if there is already a field in the data that
may not be named 'value'
to ensure that update(value = ) gets mapped to the first field
instead it will create another field named value. So instead of adding
yet more checks in change and create just got rid of it

-- Did a lot of HAFScript syntax refinements. See the haftscript manual
-- added from syntax for needs and goals to allow comparing need from explicit
share and setting goal from explicit share



----------------
20080429
made it so optional parameters on commands ; server, framework, and logger have
connectives

need to check all commands so that optional parameters have connectives
then order options appear doesn't matter

----------------
20080331

Changed algorithm for marking outline exit enty. Since execution speed is more
of a bottleneck than memory we can reduce execution speed by storing outline
as list for each frame and then get differences between outline lists
get exit and entry list on a transition.
Will need to regenerate outline every time a new frame is
added or link made if update outline at run time.


Simplified runner generator allowed by new execution ordering

.done is not set to False on framer enter not checkStart


------------------
20080327

supported timeouts:
hafscript
timeout value

add implict transact
on elapsed >= timeout goto next

what if want to go to someplace else on timeout? then use duration not timeout





fixed bug in building.Convert() where integer strings were getting converted
to base 8 or base 16 (need to check base 10 first)


Add support for next frame
Explicit
next frameName
next
Implicit lexical next

transitions

on xxx goto next

need to make next frame link and resolve it
Either with explicit
next frame
or implicit next is next lexical frame
so when creating a new frame before reassign current frame
check of next of current is empty and if so then put in new as next.

added context to mission script since no act is naturally an exit act except give
hafscript
context entry
context recur
context exit
context native

currentContext reset to native with new frame
some acts can have different context besides native
some only allow native and ignore current context



added hooks to support slave framers.
.slaves list in house
.auxes list in house
.slave flag in framer

tell now restricted to slave framers


Made it so ask not work on aux or slave framers.


initializing data shares. removed cases where created value in shared then updated it.
But update does a create if not already exist so
only need to do update when forcing and create when not forcing the value.


instead of enneeds use preacts for pre-entry actions frame
replace .enneeds and .addEnneed with .preacts .addPreact


Changed tasker
no more waiting list. all actives and tasks (loggers etc) go into ready list
regardless of period. This way order preserved for different periods no apparent
speed hit may even be faster
Task lists deques now have tuples (task, retime, period) instead of just tasks
Tasker responsible for updating retime not task. Removed .retime attribute
from tasks

Did speed tests and confirmed that tuple packing and unpacking is faster than
object attribute access.

------------------
20080326

Changed Framer and Frame
Fixed frame and aux framer execution order

-- fix exec order again. start cycle with trans so trans/enter/recur same cycle

start framer
enter initial outline
recur
time step

if trans
exit
enter
recur
time step

if trans
exit
enter
recur
timestep

Frames call trans which can call enter on auxes before lower level frames
so that lower level frames trans -> enter
can still override anything a higher level aux frame does



-----------------
20071115

added support for "ask" task control for loggers
added support for need done for loggers
added tasker
added real time to tasker
testing module now functional
added house.inactives

------------------------------------------
20071102


1) Done:
Revised Share and Data objects.
Revised odict so can be pickled
old Data can't be copied since its a dict without iteritems
old Data can't be pickled since it uses slots without __getstate__
oldalso anywhere use odict() can't be pickled since no __getstate__.

2) last no longer in share. each log makes own last copy for ifchanged


3) time creep fixed.
** basically this change means logger doesn't see the last value of elapsed on a state
change since it gets reset to zero on state entry before logger gets to run. Only way to
see it is to log it within state machine as recurring action do log deed.

fixed by having entry run on same time as exit but recur waits till next cycle.
This prevents infinite chaining of transitions and since most controllers run in different
framer there is no gap when setpoint changes. If controller runs in same framer then
last control action will apply. Since transitions are checked after all other recurring actions
all controllers in that frame will have run. This however leaves the case where a controller
runs in a lower frame. In this case the control action will not be updated on that cycle and
will be stale by one cycle. A way to fix this is have all recur actions in all frames in the outline
run before any of the transitions are checked! then transitions become their own stage.
Did this

next frame entry executes on same time step as transition
check transition
check entry
exit
enter
time step
recur
recur actions top to bottom
trans checks top to bottom

Page 17 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.