Lambda the Ultimate

inactiveTopic Project JOOS (Java's Object Oriented Subset)
started 8/23/2002; 2:10:36 AM - last post 8/27/2002; 2:29:56 PM
jon fernquest - Project JOOS (Java's Object Oriented Subset)  blueArrow
8/23/2002; 2:10:36 AM (reads: 1751, responses: 1)
Project JOOS (Java's Object Oriented Subset)
Features a compiler for a small manageable subset of Java ideal for teaching and research (Action Semantics).

If you've ever dreamed of pruning Java back, forking it, and growing it yourself with a new set of features (e.g. functional) [ O'Reilly Java3 Article, LTU Java Critique ] this seems like a good place to start.

Developing a JOOS Compiler Using a SableCC Framework (Alaoui, 2000) provides a detailed description of the Java implementation of JOOS. There are no packages, interfaces, exceptions, mixed statements and declarations, or switch statements, "fields can only be protected, methods and constructors can only be public; methods cannot be overloaded, only constructors can; arrays are not supported (this can be made up for by using Vector objects); the main method is the only allowable static member in a class; primitive types for real numbers are not supported." External declarations, similar to C's, allow you to use Java libraries and even add Java language features to JOOS: "JOOS also provides its own library of precompiled class files for interfacing to functionality supported only in Java (e.g. constants, static methods and static fields)."

There even seems to be a logical place to insert an Abstract Syntax Tree editor for source code transformation and refactoring like Intentional Programming does. Abstract Syntax Trees's are "built by the parser, using the semantic actions specified in the grammar file... The compiler then performs the usual passes on the AST, and each pass is explicitly and manually implemented as a recursive descent of the syntax tree." (Alaoui, 4-5)
Posted to OOP by jon fernquest on 8/23/02; 2:24:48 AM

Ehud Lamm - Re: Project JOOS (Java's Object Oriented Subset)  blueArrow
8/27/2002; 2:29:56 PM (reads: 623, responses: 0)
Sounds a bit like mini Java. Seems like everyone makes a Java subset, so he can do something useful and still market his research Java Inside.

If you want a language with no packages, interfaces, exceptions, mixed statements and declarations, or switch statements, "fields can only be protected, methods and constructors can only be public; methods cannot be overloaded, only constructors can; arrays are not supported (this can be made up for by using Vector objects); the main method is the only allowable static member in a class; primitive types for real numbers are not supported." why the hell are you using Java?