certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] Exception during QueryLookahead


From: Eric Noulard
Subject: Re: [certi-dev] Exception during QueryLookahead
Date: Fri, 15 Oct 2010 10:53:15 +0200

2010/10/15 Michael Raab <address@hidden>:
> Hi Eric,
>
> how is this *.msg file used to generate source code? What are the changes
> that need to be implemented?

msg files are CERTI  message specification files.
There two of them;
     certi/scripts/CERTI_Message.msg   for Federate <--> RTIA Messages
     certi/scripts/CERTI_NetworkMessage.msg for RTIA <--> RTIG Messages

Those files are processed by the CERTI Message generator, which is a Python
applications:
     certi/scripts/GenerateMessages.py
(+ several *.py file in there)

the shell script:
    certi/scripts/genallmsg.sh give an example on how to call the generator
in order to rebuild ALL messages files:
         certi/libCERTI/NM_Classes.cc
         certi/libCERTI/NM_Classes.hh
         certi/libCERTI/M_Classes.cc
         certi/libCERTI/M_Classes.hh
There are some rules in certi/scripts/CMakeLists.txt too.

Currently the generator has 3 backend:
   - msg spec file "regenerator"
   - C++ message generator
   - Java message generator

Andrej Pancik did work on the generator for his thesis
(http://download.savannah.gnu.org/releases/certi/papers/Pancik2010_Thesis.pdf)
look at chapter 4, 5 and 6. You'll get a better idea of the purpose and
way of work of the generator.

The generator has mainly be used on Linux but it should work on
Windows too since
it's 100% python code which depends on PLY and some standard python modules.

> Bugfixing this lookahead problem is just a matter of inserting one
> initialitzation line into M_Query_Lookahead class constructor.
> But I'm a litte afraid that this issue is hidden in several more places...

You may be right.
One of the purpose of the generator is to avoid the may be "huge"
task of fixing the 200+ message code inside CERTI.

Modifications you may do may be in the C++ generator backend
"GenMsgCXX.py".

Currently the generator generate "operational code" which does not
verify if a "required" message field has been [manually] set when
marshalling/serialize
is invoked.

By "self verifiying" code I meant, that the generator may be modified in order
to generate "verifying" code, which would check whether if a "required" field
is set before serialize.

This kind of self-verifying code may not be kept in production (cost
too much runtime)
but it would immedialety point out where the hole are.

I've just added a draft set of slides I am preparing concerning CERTI
Message generator;
http://download.savannah.gnu.org/releases/certi/papers/CERTI-GenMsg-draft15oct2010.pdf

(you may have to use the "noredirect"
   
http://download.savannah.gnu.org/releases-noredirect/certi/papers/CERTI-GenMsg-draft15oct2010.pdf
  link or wait for the robot mirror turn around).

The slides should give you the big picture of CERTI message generator
usage, I have another document
concerning message generator but it is written in french, do you read french?

If you know python the learning curve of the message generator
shouldn't be to sharp,
in any case if you have further questions just ask, I'll try to answer.
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]