...
| Final Array & Anonymous Class | Generic Constructors | Capture Conversion Idiom | Overloaded Methods Sharing Single Type | Covariant Arrays | Rethrown Exception |
---|---|---|---|---|---|---|
JTL | X | X | X | ? | X | X |
BBQ | X | X | X | ? | X | X |
SOUL |
|
|
|
|
|
|
JQuery | X | X | X | X (*1) | X | X |
.QL (*2) | ✓ | ? | ? | ? | ✓ | ? |
Jackpot |
|
|
|
|
|
|
PMD | X | X | X | X | X | X |
...
- no working Eclipse plugin found. (authors emailed)
- argument list pattern (sec 2.2) public _ (_, String, *) : any public method that accept a String as its second argument and returns any type
- quantifiers: no, all, exists...
- anonymous class
- pattern naming (integral := byte | short | int | long)
- variable binding
- no structural matching of AST (deemed difficult because uses class files) (so can't look match on a loop for example or find all local variables in method)
Wiki Markup read\[F\]/write\[F\] predicates to indicate whether a method reads/write to a field. Nice feature: write\[_\] tells whether method writes to a field at all. How do we do this recursively? All methods within the method are not writing to fields...
- no support for generics (according to documentation)
Use case 1 not possible because no support for local variable decl. Use case 2 & 3 not possible because no support for generics/wildcards (due to bytecode source). Use 4 not possible because no support for statements & types of expressions. Use case 6 not possible because no control flow support.
BBQ
- doesn't detect local inner classes (local & anonymous). Only inner classes (doesn't differentiate): class in all classes
- no access to local variable declared in methods
- no support for generics.
- no support for constructors (considered as method init)
- no AST structural matching. (e.g loops ...)
- no variable binding/unification
- set operators (union, intersection)
- support for read/write of fields references
Similar reasons to JTL.
Wiki Markup |
---|
*{+}SOUL \[authors replying on Tuesday\]+* |
...
- http://jquery.cs.ubc.ca/documentation/toc.html
- http://jquery.cs.ubc.ca/documentation/appendix2.html
- variable binding through predicates
Wiki Markup support for read & efftects of fields (write) \[writes(?B,?F,?L) means: "Block ?B writes to field ?F at location ?L"\]
- no structural (statement) matching (e.g pattern match on a loop or body of a method)
- no generics support
- no quantifiers
Similar reasons to JTL.
Wiki Markup |
---|
*+.QL \[authors emailed\]+* |
- New version stores every AST node unit in DB
- has notion of aggregates (count, sum, max, min, avg)
- ".QL: Object-Oriented Queries made Easy"
Very expressive. Though sql statements may not scale for control flow matching. (direct ast pattern matching is clearer for some use cases)
Wiki Markup |
---|
*{+}Jackpot \[emailed Jan from Netbeans\]+* |
...
- http://www.ing.iac.es/~docs/external/java/pmd/rules/design.html
- http://code.google.com/p/code-cop-code/wiki/PmdRulesCodecop
- structural matching: all AST hiearchy can be queried through Xpath expression
- can't express subtype relations. E.g. assignments where RHS is supertype of left handside and different
- no variable binding
- support generic constructors but not bind it to enclosing class: //ConstructorDeclaration//TypeParameters
- no support for read/write effects
No variable binding support which restricts a lot of the analysis.
Taxonomy
- Model: Relational vs Tree
- control flow statements
- variable binding & cross reference
- types information of AST nodes + type constraints (subtype relations)
- set operators
- generics / wildcards
- read/write references
- anonymous class
- aggregates (grouping results)
- pattern matching? (i.e JTL style for argument list, SOUL like for AST matching)
- universal quantifiers (forall, exists, no)
- querying style
...