Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

PROIV precompilation


7 replies to this topic

#1 markc

markc

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 18 March 2003 - 11:47 AM

We want to use a product that measures the quality of test data by measuring the number of logical paths executed during any test run.

In order to do this we need to "precompile" the source code i.e. to embed parameterized exits to the software at logical decision points in the code, which will write information to a file for later analysis.

What facilities/utilities etc will provide us the simplest way of modifying the existing code in this way or do we need to export the existing code, precompile it and import the modified code?

#2 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 372 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 18 March 2003 - 12:27 PM

Not sure what you mean by 'precompiling' Pro-iv code.

It doesn't even get compiled. Rather a set of instructions are
stored in files at gen time and then executed in sequence by
the kernel at run-time.

You can create a P4 global function that links to your 3rd party
s/w and call it from wherever you need to in P4.

HTH
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#3 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 18 March 2003 - 06:40 PM

I believe you will not be able to do this with ProIV.

I presume the "product" you refer to is for C?
Nothing's as simple as you think

#4 markc

markc

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 19 March 2003 - 11:17 AM

Thanks to all who replied to the posting and to me personally. I think I may have posed my issue in a confusing way... let me try and clarify.

Our problem is we need to parse the PROIV code to determine the decision points in the program e.g. in an IF ....... ELSE ........ structure there are two possible paths.

On the basis of this parsing we need to modify the PROIV code and insert an exit to our monitoring routine.

In the example above, we would need to insert an exit to this routine straight after the IF and also after the ELSE so that we can determine after a test run which path was executed during the test run.

The problems therefore are :

1) What is the best way to get to the actual PROIV logic so that the code may be automatically parsed by a third party product
2) What is the best way for the third party product to automatically edit the PROIV code to insert the appropriate exits. This edit would need to be "temporary" (since you don't want this code in production usually!)

Does this help clarify the issues we need to resolve?

#5 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 19 March 2003 - 12:44 PM

Hi,

You would have to write a ProIV function to do that. 3rd party products (i persume that you mean in another language...) would have trouble accessing the logic file. Because its in ProISAM format.

The 'logic' of a function is stored in a bootstrap file called logic.pro

You could write a function that looked for certain conditions and then insert your line.

Rob D.

#6 Chris Pepper

Chris Pepper

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:United Kingdom

Posted 19 March 2003 - 01:30 PM

I suggest writing a Function to dump the logic for a function or functions to a text file and a routine to reload
back from the text file to the logic file.

The routine can then parse and modify the text file. After processing the logic text is reloaded. Provided no other edits are done before running the tests the original state can be acheived by reloading the original text file. (Alternatively just take a copy of the logic.pro file and restore it afterwards).

The logic.pro file is very simple to extract to a text file - the only thing watch when reloading is to handle lines that might be extended to over 70 characters.

#7 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 19 March 2003 - 01:42 PM

The logic.pro file is very simple to extract to a text file - the only thing watch when reloading is to handle lines that might be extended to over 70 characters.


Its now 100 characters, in 5.0 & 5.5

Rob D.

#8 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 19 March 2003 - 01:49 PM

As Chris suggests, extracting logic into a text file is likely the only way you could get a 3rd-party product to analyse the logic - that's assuming you can successfully teach it to parse ProIV logic :eek:

Remember, the logic alone by no means reflects "all" the possible execution paths - those also depend on the infamous ProIV "timing cycle". However, if it is only coverage analysis within individual logic routines you are interested in I guess that doesn't matter.

If it did matter, remember ProIV has some pretty "unusual" branching capabilities (FLD, LSEXIT, FNEXIT, DSEL, DSELF.. )

For my interest, can you tell me what coverage analysis tool you are proposing to use or would recommend?
Nothing's as simple as you think



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!