A method of static code analysis

L

Logan Lee

This is a method I have devised.

Not really organized but
http://www.geocities.com/logan.lee30/Definitions_and_examples.pdf.

Definitions

I=if; EI=else if; E=else

(I) is one of I, EI, E or I, EI or I, E.
(I)[3]=I, EI, E
(I)[2]=I, EI or I, E.

Let ((I))_1 be F, (I)_i, F and ((I))_2 be (I)_i, F, (I)_j. Then:

((I))_1[5]=F, (I)[3], F
((I))_2[7]=(I)[3], F, (I)[3].

Sample Code:

Let's try to represent(I apologise for incorrect syntax in relation to
ANSI C):

for
if
else if

in terms of our definition above.

It is equivalent to ((I))_1[3] or F, (I)[2]. Actually ((I))_1[3]=F, (I)[2].

Note that this is ambiguous because we haven't distinguished between
(I)[2]= I, EI or I, E. But this is a minor issue that can be resolved very
easily. The point is that using my method we are able to quickly classify
a certain control loop structure found in ANSI C code. Tell me what you
think. Thanks.
 
L

Logan Lee

Mon, 24 Dec 2007 01:39:14 +0000ì—, Logan Lee ì¼ìŠµë‹ˆë‹¤:
This is a method I have devised.

Not really organized but
http://www.geocities.com/logan.lee30/Definitions_and_examples.pdf.

Definitions

I=if; EI=else if; E=else

(I) is one of I, EI, E or I, EI or I, E.
(I)[3]=I, EI, E
(I)[2]=I, EI or I, E.

Let ((I))_1 be F, (I)_i, F and ((I))_2 be (I)_i, F, (I)_j. Then:

((I))_1[5]=F, (I)[3], F
((I))_2[7]=(I)[3], F, (I)[3].

Sample Code:

Let's try to represent(I apologise for incorrect syntax in relation to
ANSI C):

for
if
else if

in terms of our definition above.

It is equivalent to ((I))_1[3] or F, (I)[2]. Actually ((I))_1[3]=F, (I)[2].

Note that this is ambiguous because we haven't distinguished between
(I)[2]= I, EI or I, E. But this is a minor issue that can be resolved very
easily. The point is that using my method we are able to quickly classify
a certain control loop structure found in ANSI C code. Tell me what you
think. Thanks.

http://www.geocities.com/logan.lee30/more_comprehensive_example.html
 
L

Logan Lee

Mon, 24 Dec 2007 01:39:14 +0000ì—, Logan Lee ì¼ìŠµë‹ˆë‹¤:
This is a method I have devised.

Not really organized but
http://www.geocities.com/logan.lee30/Definitions_and_examples.pdf.

Definitions

I=if; EI=else if; E=else

(I) is one of I, EI, E or I, EI or I, E.
(I)[3]=I, EI, E
(I)[2]=I, EI or I, E.

Let ((I))_1 be F, (I)_i, F and ((I))_2 be (I)_i, F, (I)_j. Then:

((I))_1[5]=F, (I)[3], F
((I))_2[7]=(I)[3], F, (I)[3].

Sample Code:

Let's try to represent(I apologise for incorrect syntax in relation to
ANSI C):

for
if
else if

in terms of our definition above.

It is equivalent to ((I))_1[3] or F, (I)[2]. Actually ((I))_1[3]=F, (I)[2].

Note that this is ambiguous because we haven't distinguished between
(I)[2]= I, EI or I, E. But this is a minor issue that can be resolved very
easily. The point is that using my method we are able to quickly classify
a certain control loop structure found in ANSI C code. Tell me what you
think. Thanks.

http://www.geocities.com/logan.lee30/A_method_of_static_code_analysis.html
 
M

Mark McIntyre

This is a method I have devised.
(snip )
very easily. The point is that using my method we are able to quickly
classify a certain control loop structure found in ANSI C code. Tell me
what you think. Thanks.

Euh, what exactly is the problem you're trying to solve, and how is it a
C problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top