I have a rule. The snippet offers the symbol table to ID state on behalf of callers, but they do not do name space and if a symbol conflict arises, undefined to conflict, then the snippets issue the ERROR return, the console loop will decide if a burp is needed. If the snippet thinks it is lost, pull a control c signal, force a syntax error. Thus, the missing semantics get burped right back to the data manager.
Right now, on error return, the untested default action is for exec command to find the end of the bad command, and keep going, if it is not null; otherwise it defers to console loop and fgets for input. In other words, at this level, raise the bus error flag ASAP before thing continue and need burping later anyway. We clearly have a choice of default action on error, and I submit to the wisdom of the pros on this.
In playing with my shared segment manager, I ended up going back to segment naming, and assuming unique names. It is the simplest call set up for the methods whenever I try a new snippet. Consent is no different,Nodes, segments, and pids are all valid, unique names, and the method immediately can get the 'type' information from the table for a named argument. I don;t worry look up times, the pros will keep that speedy.
So, segments are managed by name:
NewSeg name size;
DelSeg name;
And node names are the same for inter node consent messages:
NewList node_name list;
Even in standalone tests, a copy, replicate, with a sprint to make a symbol name works great. I can generate NewSeg and DelSeg at will and really bang the segment manager, and which currently remains mostly broken. All the segments have a quick standalone "main" for bang testing. Then Default loads them and bangs them in tests. These snippes are very manageable, especially so if they can assume well managed name space, their items under state are well named without systematic syntax errors.
No comments:
Post a Comment