openArchitectureWare.org

oAW has moved to Eclipse.

At this site you will find information about the outdated version openArchitectureWare 4, only.
Please read our letter of intent for further information.

 
   

oAW4 beta1 available

Hi everybody,

we've released a first beta version of the upcoming oAW4 generator framework.
There are two new languages contained in this release. Additionally, the Eclipse editor support has been improved.

I've made a short presentation, showing some features. Have a look

Download the release from sourceforge : download

A short description of the new languages follows:

New Language: Extend

„Extend“ can be used to define arbritary libraries usable in every language based on the new oAW4-expressions sublanguage.

Here is an example:


import ecore; // imports the namespace 'ecore'

extension my::other::ExtensionFile; // imports all extensions from another extension file


/*
 * computes the fully qualified name 
 */
fullyQualifiedName(ENamedElement ele, String delim) :
    ele.eContainer !=null ?
    fullyQualifiedName(((ENamedElement)ele.eContainer),delim)+delim+ele.name : 
    ele.name
;

/*
 * this extension points to a public static Java method
 */
String doIOStuff(String txt) :
    JAVA my.JavaClass.staticMethod(java.lang.String)
;


As you can see, there are two different kinds of extensions:
The first one simply uses the new expressions to implement the behaviour of the extension. The second maps the extension signature to a public static Java method.
You shouldn't need the Java extensions very often, because most things can be done using expressions (IO stuff might be an exception).



Extensions can be invoked on member position


This means that you can either write

ele.fullyQualifiedName()
or
fullyQualifiedName(ele)
Both do the same thing!


Return types are inferred for expression extensions


Maybe you've allready seen, that there is no return type specified for the first extension. That's because they can be derived from the expression.
The special thing is, that the static return type of such an extension depends on the context of use!
For instance, if you invoke the following extension
asList(Object o): {o};
with a String, it's type is List[String].


Validation language: Check

The second language is called „Check“ and is an equivalent to OCL.
An example:


ctx EClass WARN 
	"An EClass should have at least one feature" :
	this.eStructuralFeatures.size()==0
;

Mean: "ouput a WARNing for each instance of Eclass with zero structural features".

The syntax is:


“ctx“ typeName (WARN|ERR) msgExpression : condition ;

Namespaces and extensions can be imported as shown above.

The Eclipse-Editor-Plugins for Xpand, Extend and Check have been improved significantely.
For now, we have static type checking, syntax highlighting and code completion.


oAW4 beta1 available | 3 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
oAW4 beta1 available
Authored by: A. Schmacks on Monday, January 23 2006 @ 08:22 PM CET
Thanks, Sven. Your presentation is awesome!
I recommend it to everyone interested in oAW 4!

The new features are great and everything seems very well structured. The Eclipse editor support for the different languages is perfect, too.

Thumbs up!!

~Alex