New in HUTN 0.7.1

Last week we released v0.7.1 of our Human-Usable Textual Notation implementation. It’s available as part of Epsilon 0.8.1. In this release, we’ve aligned our implementation more closely to the OMG specification, and added some new features. Here’s a summary of the changes:

Validation

An error is now produced when enumerations, data types and abstract classes are specified as the type of an object.

An error is now produced for objects that do not specify the value of attributes with a lower bound greater than zero.

Adjectives

Positive adjectives are no longer prefixed with the # symbol. For instance:

DogPackage {
    male Dog "Fido" {}     // old syntax was #male Dog
}

Adjectives prefixed with the # symbol will cause a deprecation warning.

Enumeration Values

Support for enumeration values in association instances has been added. The syntax is:

DogPackage {
    Dog "Lassie" {
        breed: Collie    // Enumeration value
        name: "Lassie"   // String value
    }
}

Classifier-Level Attributes

Support for classifier-level attributes has been added. The syntax is:

DogPackage {
    Dog.breed: Collie;  // All dogs in this package are Collies by default

    Dog "Lassie" {}
    Dog "Jessie" {}

    Dog "Scooby" {
        breed: GreatDane
    }
}

Classifier-level attribute values take precedence over any default value rules specified in a HUTN configuration model.

Associations: Block and Infix Notations

Support for association blocks has been added. Assuming that the Family class has a reference called “pets” accepting objects of type Dog, the syntax is:

DogPackage {
    Family "The Smiths" {}
    Dog "Rover" {}
    pets {
        Family "The Smiths"
        Dog "Rover"        // Refers to the existing Pet object, defined above
        Family "The Smiths"
        Dog "Fido"        // Created automatically by the association block
    }
}

Similarly, associations may be specified using an infix notation. The example above could be written:

DogPackage {
    Family "The Smiths" {}
    Dog "Rover" {}
    Family "The Smiths" pets Dog "Rover";
    Family "The Smiths" pets Dog "Fido";
}

We hope you find the improved validation and more flexible syntax useful. You can update your installation using the Eclipse update manager, or follow the instructions on the Epsilon download page.

About these ads
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s