Related articles |
---|
call tree alin.arsu@gmail.com (Alin) (2006-05-09) |
Re: call tree DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-05-11) |
From: | "Alin" <alin.arsu@gmail.com> |
Newsgroups: | comp.compilers |
Date: | 9 May 2006 00:54:21 -0400 |
Organization: | Compilers Central |
Keywords: | analysis, question |
Posted-Date: | 09 May 2006 00:54:21 EDT |
Hello,
I have a hard question (at least for me)...
"There are API calls which are not allowed to be called in certain
constrains and must be identified". THis means a sequnce:
constrainStart();
API1();
constrainStop();
is not allowed.
Using a tool like Understand C I can have the call tree but this is not
enough because the call tree will contains only the functions are
called but no information about how many times and order...
I have next C code:
void f1(void)
{
if (condition)
{
constrainStart();
}
else
{
API1();
constrainStart();
}
constrainStop();
}
The simple code tree will be something like:
constrainStart();
API1();
constrainStop();
Base on the "constrains rules" this is not OK. THat meas only the
function call tree it's not enough...
If we will consider the order we have:
constrainStart();
API1()
constrainStart();
constrainStop();
and again seems the calls are not OK...THis means only simplke check of
calls order is not enough,too...
If "alternates" are taken, based on if I have:
constrainStart();
constrainStop();
API1();
constrainStart();
constrainStop();
and this shown the code is OK....
My question is: how can this be checked automatically...A pratical
approche is better then a theoretical one... A theoretical one will be
helpfull too...
Any hints, ideas, links, similar problems, similar problems solutions
are welcome....
Regarding the languages:
The source which must be checked is ANSI C
The pseudo-checker I'm thinking to Perl...
All ideas are welcome
Return to the
comp.compilers page.
Search the
comp.compilers archives again.