An experimental implementation of DALA on top of Java
View software licence here. This code contains a shaded version of some of the classes from Collections.java.util.concurrent package
NOTE: There is debugging code which stores the java class files, this only works on Windows machines Please comment out debugCode(); on line 25 here and Files.write(Paths.get("../generated-classes/" + result + ".class"), classWriter.toByteArray()); on line 64 here
For specific documentation on how to setup on intelliJ please view here
The program needs to be compiled twice to run, first for the agent and second is the actual program
First run to build the java agent (and skip the tests as they need the agent to pass)
mvn clean package -DskipTestsStatic Attachment of agent needs to be set. If using intellij this can be done by adding opting the run configuration and adding
-javaagent:target/jdala-agent.jarto the VM options. In command line this can just be added as an extra flag.
This the decisions made and how they effect the project are stored in the docs folder.
- Annotations
- Deep Immutability
- Isolated Behaviour
- Object Validation
- Default Immutable Classes
- Portal Classes
There are three possible annotations that a local variable can have. These are:
import nz.ac.wgtn.ecs.jdala.annotation.Immutable;
@Immutable Box var = new Box("foo");import nz.ac.wgtn.ecs.jdala.annotation.Isolated;
@Isolated Box var = new Box("foo");import nz.ac.wgtn.ecs.jdala.annotation.Local;
@Local Box var = new Box("foo");