Personalities/J Compiler (PJC)
by Diego Rodrigo, Daniel Gandara, and Luis Blando
The Personalities/J compiler translates Personalities/J languaje into Java code. Afterwards, this generated code must be compiled into Java bytecode with any Java compiler. Personalities are new design entities that help object-oriented designers during all the phases of the software lifecycle, providing facilities for Role-Modeling. For further information on Personalities, follow the link to the Personalities page. The current version of the compiler supports only static Personalities. We are working on a next full featured release which will support dynamic Personalities and Personalities inheritance. It will also have a better semantic analyzer along with some other optimizations.
Note: You only need the complete set of tools if you want to modify
or enhance PJC. If you only want to run it, demjava.jar
(which can be found in the
Demeter/Java distribution) is enough.
- JDK 1.1.6 or greater - get it here !
- JavaCC 0.7.1 or greater - get it here !
- Demeter/Java 0.7 or greater - get it here !
PJC is distributed in the 'gzip' format. In order to uncompress the distribution you will need the gzip utility which is freely available for Unix systems or the WinZip utility, which is available for Windows systems. You can get the latter from http://www.winzip.com
The following versions are available online:
For installation information, please browse the INSTALL file of the latest distribution.
For compilation information, please browse the COMPILE file of the latest distribution.
For the changes history, please browse the CHANGES file of the latest distribution.
For a list of the bugs and/or enhancements planned for PJC, please browse the TO-DO file of the latest distribution.
This was the first example in Personalities' life : the animal hierarchy. It's very interesting for educational purposes, because of the relationships between the animals and their roles.
(you need just one of the above files)
Take a
look at the original P/J code , and then at the generated Java code. You should
be able to identify how each personality was translated into two files -an
interface: <personality.java
, and a class <personality$Ego.java
. You can also notice how personifying
classes have changed (pj - java), with their personalities' upstream methods
added.