Findbugs dataflow analysis - analysis

I'm using Findbugs to find the definition of a variable. The use case is that if a detector finds a bug, I need know where the definition of the variable related to the bug. Is there any API or I need implement it.

Related

Evaluating Rascal's Performance?

I want to evaluate the performance of Rascal for a given rewrite system that I've written. I'm wondering if there's a good way of doing it?
Ideally, I'd generate some compiled Java classes from the system and then run them manually against my inputs. Is there an easy or recommended way to do it?
Cheers,
One way to do this is to use the functions in the library util::Benchmark. Typically, you could write something like
cpuType( (){ call_the_function_I_want_to_observe(); } ). This will execute your function and print the cpu time used.
Note that Rascal can be executed in two ways: interpreted and compiled which makes a big difference when measuring performance. We are working hard at the moment to fully integrate the compiler in the Eclipse IDE, but a stand alone version is available as well. This can be called as java -Xss8m -jar rascal-0.8.4-SNAPSHOT.jar --compiledREPL followed by at least values for directories for sources (--src), and binaries (--bin). Here rascal-0.8.4-SNAPSHOT.jar (but most likely named differently) is downloaded from the https://update.rascal-mpl.org/console/rascal-shell-unstable.jar.
If you need more information, don't hesitate to ask for more details: this part of our tool chain is unfortunately still undocumented.

UCD equivalent for Groovy/Grails?

In Java projects I use UCD for cleaning dead/unnecessary code, and I love it.
Is there an equivalent in Groovy/Grails land?
Given the highly dynamic nature of Groovy it would be very difficult (if at all possible) to do something similar to this.
I haven't seen any tools that are capable of what you are looking for and I doubt any exist for the reasons above.
The codenarc project (Static Analysis for Groovy) has some rules to detect unused and unnecessary code.

Running a Rascal program from outside the REPL

I'd really like to be able to run some Rascal's program from outside the REPL (e.g. as part of a script, or called from another program). What I'm using Rascal for is and intermediate stage in a larger framework so I am wondering what the best way to go about integrating executing the Rascal code from another program.
Right now the best way is to package your code together with the Rascal shell executable jar. There is a convenience class JavaToRascal for calling into Rascal code. Sometimes it requires some thinking to add your own modules to the Rascal search path using IRascalSearchPathContributors, but if you include a RASCAL.MF file with the right properties it all should go automatically.
If you are thinking of an Eclipse plugin, then the best way is to let your plugin depend on the rascal-eclipse plugin and use ProjectEvaluatorFactory to get access to the interpreter.
Caveat: since we are moving to a compiled system, the code you write for this kind of integration will change. This is the reason we haven't documented the API for calling Rascal from Java yet.
As I was pondering the same question, this is the (maybe trivial) answer I came up with:
java -jar /path/to/rascal-shell-stable.jar path/to/myProgram.rsc
You have to be aware that Rascal calculates module names from the current directory (don't know if it supports something like Java's CLASS_PATH), so in the above example myProgram.rsc should have a module declaration of module path::to::myProgram. Calculated and declared module name have to match.

VHDL test results into jUnit (or other Jenkins-recognized) format

I'm setting up automated regression testing for an FPGA project, almost exactly as described here:
Continuous integration of complex reconfigurable systems
Now I want to get test results (from VHDL REPORT statements in ModelSim simulation) to appear in Jenkins testing reports. My understanding is that Jenkins only natively supports jUnit format, and I looked for plugins supporting non-XML formats but didn't see any.
Generating valid XML from VHDL REPORT statements would be very difficult, since the simulation may immediately terminate depending on the severity. Which means that the closing tags would have to be duplicated in every single possible exit path for every single test -- not the most maintainable approach.
So, do you know of any straightforward way to convert plain text into jUnit (or another format, if supported by Jenkins)? If something doesn't already exist, is there an advantage to writing a Jenkins plugin vs just throwing together a perl script? Any other suggestions?
You should take a look at the XUnit Plugin. The Plugin reads test results from a number of tools, and seems adaptable to custom formats. From the documentation the plugin is able to read not only xml, but also csv and txt. For custom format you need to specify some style sheet for the transformation, I am not quite sure if this will go all the way for you. But even if it does not, I suppose the plugin should be easy to extend for your own format.
Old post but today there is a unit testing framework for VHDL that we've developed. It solves the problem by generating a report on the JUnit format. It also handles the case when the simulation stops due to a severe error. The tool is free and open source and can be found at https://github.com/LarsAsplund/vunit

Create Debian package using Apache Ant

Is there anywhere that can give you a tutorial or anything on creating a Debian package using Ant?
I'm being told its already a part of Ant but I've never seen any functions even remotely associated with it.
I don't want to use ant-deb-task either seeing as its not actually part of Ant.
There is no task for this in the core Ant distribution.
There are examples for ant-deb-task available in the examples file on the download page.
Another option is jdeb which also provides documentation.

Resources