A method of static code analysis

Discussion in 'C Programming' started by Logan Lee, Dec 24, 2007.

  1. Logan Lee

    Logan Lee Guest

    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.
     
    Logan Lee, Dec 24, 2007
    #1
    1. Advertising

  2. Logan Lee

    Logan Lee Guest

    More comprehensive example

    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
     
    Logan Lee, Dec 24, 2007
    #2
    1. Advertising

  3. Logan Lee

    Logan Lee Guest

    Sorry but 'F' stands for 'for'

    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.
     
    Logan Lee, Dec 24, 2007
    #3
  4. Logan Lee

    Logan Lee Guest

    I've retyped this and stored in URL so look if you want

    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
     
    Logan Lee, Dec 24, 2007
    #4
  5. Logan Lee

    Remo D. Guest

    Re: I've retyped this and stored in URL so look if you want

    Logan Lee ha scritto:
    >> This is a method I have devised.
    >> Definitions
    >>
    >> I=if; EI=else if; E=else
    >> [...]


    Sorry Logan, I might have missed it. Which problem are you trying to solve?

    Remo.D
     
    Remo D., Dec 24, 2007
    #5
  6. On Mon, 24 Dec 2007 01:39:14 +0000, Logan Lee wrote:

    > 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?
     
    Mark McIntyre, Dec 24, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jens Nordahl

    Static code analysis

    Jens Nordahl, Apr 22, 2004, in forum: C++
    Replies:
    1
    Views:
    427
    Claudio Puviani
    Apr 22, 2004
  2. Don

    Static Code Analysis Tools

    Don, Jul 25, 2003, in forum: C Programming
    Replies:
    1
    Views:
    391
    Eric Sosman
    Jul 25, 2003
  3. kramer31

    Static Java Code Analysis

    kramer31, Feb 20, 2009, in forum: Java
    Replies:
    3
    Views:
    585
    Joshua Cranmer
    Feb 21, 2009
  4. ssubbarayan
    Replies:
    5
    Views:
    2,397
    Dave Hansen
    Nov 3, 2009
  5. Hubert ÅÄ™picki

    Static code analysis in Ruby 1.9

    Hubert ÅÄ™picki, Aug 23, 2010, in forum: Ruby
    Replies:
    5
    Views:
    172
    Michel Demazure
    Aug 24, 2010
Loading...

Share This Page