Jump to content

Code Checking


Recommended Posts

QUOTE (Gary Rubin @ Mar 2 2009, 09:05 PM)

A partner of ours just suggested running Polyspace on some of our code. I'm not sure they understood that the code is written in LabVIEW. Does anyone know of a similar code-checker for LabVIEW code? CRelf, does one of your products do that?

Gary

Hi Gary

A quick look at the Polyspace web site confirmed what I had expected, that they do not support LabVIEW.

One product that I really think would be worth your time looking at is the NI LabVIEW VI Analyzer , we use this toolkit on ALL our LabVIEW VI's before they are made available to the main development line. This toolkit will help you to both enforce your development style guide (or rules) and it can find sources of error's within your code that may have been missed by normal visual inspection.

We had a code base of around 1000+ VI's when we first started using the VI analyzser and I ran the analyzer on our existing code base. Some example of the kinds of things it found were

  • Error inputs not connected. We use Error I/P a lot to ensure correct sequencing of our code and we had a situation where a VI had been placed on top of an error line so it looked like it was wired in but was not, visualy you could not tell it was not wired in unless you moved it.
  • In a couple of VI's we had more than one array auto indexing into a for loop.
  • A wire N terminal in a for loop and an auto-indexing array.

These small silly mistakes that should not happen when writing code, but lets be honest they are thing we can all do at times. Now all our new code is both visually inspected by a peer and by the VI Analyzer.

With the Analyzer you can to a limited extent tailor that test run and if you want you can create your own tests.

My biggest complaint is that it should be the VI ANALYSER NOT ANALYZER :ninja:

The VI analyzer and peer reviews are only part of the answer, the next step that also needs to be done and I will be looking at this soon is unit testing of your VI's, preferable single button automated unit testing. With this in mind I also suggest you look at the following.

  • The new JKI VI Tester, look here and here and on Lava here, though I have not yet had time to look or play with this I must say if is of the same quality that we have come to expect from JKI stuff then it will be very good.

An aside

We often see threads questioning if LabVIEW is a proper Software Language or Mainstream enought, and I think that with the introduction of these type of tools and the VIPM it is becoming hard to deny it that it is. If only they would do something to make the hierarchy and search tool's actually of some use and responsive :headbang:

cheers

hope this help

Dannyt

Link to comment

QUOTE (Gary Rubin @ Mar 2 2009, 04:05 PM)

A partner of ours just suggested running Polyspace on some of our code. I'm not sure they understood that the code is written in LabVIEW. Does anyone know of a similar code-checker for LabVIEW code? CRelf, does one of your products do that?

We do, and we don't :) Some of our tools are getting a little long in the tooth these days, and they've been (at least in part) replaced by other tools from QA verified companies like National Instruments, so it makes little sense for us to continue to maintain those tools. I think what you're looking for is code verification on two levels: that the code is of good style, and that's it's functional. For the former we use the VI Analyz/ser that dannyt suggested for static code analysis, for the latter we use the Unit Test Framework for dynamic analysis.

Link to comment

QUOTE (Darren @ Mar 5 2009, 12:47 AM)

I say 'zee', and I don't draw lines through the middle of my Zs or 7s either.

You don't? How do you differentiate between z's and 2's? I started putting lines through my z's in college, when I started to have trouble interpreting my physics equations.

Link to comment

QUOTE (Gary Rubin @ Mar 5 2009, 12:48 PM)

You don't? How do you differentiate between z's and 2's? I started putting lines through my z's in college, when I started to have trouble interpreting my physics equations.

I'v never seen a Z with a line through it, I feel I may be missing something

Link to comment

QUOTE (Gary Rubin @ Mar 5 2009, 06:48 AM)

You don't? How do you differentiate between z's and 2's? I started putting lines through my z's in college, when I started to have trouble interpreting my physics equations.

My Zs have a distinct angular upper corner...my 2s have a curved upper corner. They look pretty much exactly like 'Z' and '2'.

Thread hijack ftw!

-D

Link to comment

QUOTE (Darren @ Mar 5 2009, 11:43 AM)

My Zs have a distinct angular upper corner...my 2s have a curved upper corner. They look pretty much exactly like 'Z' and '2'.

Then you have better penmanship than I do.

Is it really a hijack if I'm helping hijack my own thread?

Link to comment

Since this thread was discussing the value of VI Analyzer as a code checking tool, does anyone have additional information regarding this discussion on Info-LabVIEW?

This troubles me deeply...

Subject: VI Analyzer no longer part of NI Developer Suite Core

From: "Matt Dennie (Info-LabVIEW)" <BWWNTLKEJTYF@spammotel.com>

Date: Mon, 9 Mar 2009 10:09:01 -0400

I was just reading the letter accompanying my 1Q09 Developer Suite package,

and I discovered that in future releases the VI Analyzer Toolkit will be a

$1000 add-on instead of part of the Core Package.

Has anyone else noticed this, and is anyone else alarmed by this change?

-- Matt

Link to comment

VI Analyzer is being removed from Developer Suite Core, but the price of the standalone toolkit has not changed. We are investing in new functionality for the next version of LabVIEW that warranted moving it into a new Developer Suite Bundle for Software Validation Tools. This bundle also includes the new Unit Test Framework and the Desktop Execution Trace Toolkits and offers roughly a 40% discount over the cost of these tools individually.

In the meantime, those of you who have VI Analyzer through a previous purchase of DevSuite Core and are still subscribed to SSP will still be able to activate the version that came out in Q1 using your previous serial number.

Hope this helps

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.