|
FAQ
Frequently Asked Questions about Cofoja
Featured Are there any pre-packaged JAR files I can download?We now provide official snapshot builds of our development tree, available under the Downloads tab. However, please note that Cofoja is a very young project so be sure to check back for updates, in order to keep up with the most current changes and bug fixes. The official builds are bundled with the ASM library and have self-contracts (contracts that we have put on Cofoja's own classes) turned on, to help us track bugs (see below, "are you eating your own dogfood?"). Alternatively, Nhat maintains a directory with snapshot builds in different flavours, built from his development branch: http://www.huoc.org/~minh/cofoja/ (Plain versions come bundled with ASM classes; -bare versions only contain Cofoja files. ccofoja builds have Cofoja's own contracts turned on.) What do I need in order to use Cofoja?Cofoja depends on Java 6 or higher for annotation processing and instrumentation support. The ASM package is also required and can be downloaded from: http://asm.ow2.org/ (Cofoja is being developed against version 3.3; A version higher than 3.2 is required.) Cofoja comes with an Ant script for compilation and a set of JUnit 3 tests. How is this better than using assert?
Is this framework related to 'ModernJass' from Sourceforge.net?Yes, Cofoja is a significant rewrite of ModernJass. We worked closely with the original author of ModernJass (Johannes Rieken) on this. Is code annotated with contracts slower than code not annotated?If runtime checking is enabled, yes. If runtime checking is disable the code is as fast as if there were no annotations. Is the contract code compiled? I only see strings in annotations!The annotation processor takes care of compiling the strings into bytecode and runs along the Java compiler, so you get static syntax and typing errors at compile time, as usual. Is there any IDE support yet?Not yet. The eclipse plugin from the ModernJass sourceforge.net page is obsolete. Let us know if you would like to help! What about debugger support?Contracts for Java adds standard debugging information, such as source file and line numbers, to contract code. Debugging has been tested under JDB, Eclipse and IntelliJ (using remote debugging); only Eclipse has issues with setting breakpoints on contract annotations (source correspondence and step-by-step debugging works, though). Is the source code of Contracts for Java annotated with contracts? (I.e. are you eating your own dogfood?)Yes, all the classes in Cofoja that could bear contracts have been contracted; some classes needed at run time cannot be annotated because of technical reasons. New classes are only added to the project with proper contracts. |
► Sign in to add a comment
How are the assertions of the type where they "compares two arrays are equal or not" are provided in cofoja?
Hope your question was answered in the list. Please use the mailing list for general questions, since it is much more likely to get answered and it keeps the questions organized :) Cheers