* Programming Guide * CJDT User Guide * Publications * Tutorial * Language Spec.



Source Code


Community Info

About Us


ST Logo
TUD Logo
< Back

Release Notes v0.6.0

What's new?

The major addition in this version is the implementation of the family type checker. Note that 0.6.0 is an experimental version that still requires some fine tuning, hence if you require a more stable version of Caesar, please consider using the 0.5.3.

Family Polymorphism

Virtual types can be annotated with a path expression to the enclosing family. In order to be able to statically type-check the family, each element of the expression has to be final.

For example:
final Graph g1 = new Graph();
final Graph g2 = new Graph();
g1.Node n = g1.new Node();
g2.Node n = g1.new Node(); // type-checker error

Dependent types can be declared whereever a plain Java type declaration would be valid (In cclass-es as well as in plain Java classes). In the following a few examples:

As field:
public class A {
    public final Graph g = new Graph();
    public g.N n = g.new N();

In method signatures:
public class A {
    public final Graph g = new Graph();
    public m1(g.N n) {...}
    public g.N m2() {...}
    public void m3(final Graph someOtherGraph, someOtherGraph.N n1, g.N n2) {...}

For more information on the semantics of dependent types please refer to the language specification.

Have a lot of fun experimenting with the new type checker and feel free to send us your feedback.

Known limitations

  • Family type checks on wrapper recycling calls do not work.

  • Since we only have deault constructors we can not pass families from outside to initialize a family field in the class.

  • Virtual classes can inherit only from another virtual class explicitly declared in the same enclosing class. If you want to inherit from an implicit class simply override it and leave the body empty.

  • There are certain visibility restrictions:
    • package visibility is not available.
    • cclass'es must be declared as public.

  • public fields can be only written in via this, access from outside is read-only

  • Arrays of cclass-es are not allowed.

  • It is not possible for Caesar classes to inherit from pure Java classes. Nevertheless Caesar classes can implement Java interfaces.

  • Constructors of Caesar classes cannot take parameters. So more sophisticated initialization must be achieved through additional initializing method call after the object is created.

  • Pointcut language cannot refer to Caesar type system but rather to the underlying generated Java classes and interfaces.