USE logo
Improvements in 2.2.0
Back

Improvements in USE 2.2.0

This document briefly describes major changes of USE since the 2.0.1 release

USE now supports association classes

Association classes can now be specified in the model description (.use file) Since an association class is both a class and an association, it can contain attributes and operations sections. The following example demonstrates how association classes can be specified in USE 2.2.0:

model AssociationClassModel

class Company
attributes
  name : String 
  town : String
end

class Person
attributes
  ssn : String  
  age : Integer
end

associationclass WorksFor
between
  Company[0..1] role employer
  Person[1..*] role employee
attributes
  salary : Integer
end


associationclass EmployeeRanking
between
  Person[*] role bosses
  Person[*] role employees
attributes
  score : String
end

  
class diagram for the association class

A link object (an instance of an association class) can be created as follows:

use> !create IBM:Company
use> !create Ada:Person
use> !create AdaWorksForIBM:WorksFor between (IBM, Ada)
  
object diagram for the association class
(back)
Association end navigation

In certain cases the simple dot operator based navigation is ambiguous, because the source end to be used has to be chosen, too. This problem regards higher order reflexive associations and reflexive association classes. In the current USE version, the standard OCL qualification mechanism can be used to select a source association end. The following class and object diagrams demonstrate the problem:

class diagram for the navigation object diagram for the navigation

The following navigation is ambiguous:

use> ? Ada.employeeRanking.score
< input >:1:5: The navigation path is ambiguous. A qualification of the source
association end is required.

By qualifying the navigation by selecting 'bosses' as the source association end (in square brackets), the expression evaluates as follows:

use> ? Ada.employeeRanking[bosses].score
-> Bag{90} : Bag(Integer)
(back)
Generator

USE was extended by a tool called Generator for generating valid snapshots for given class models. The snapshots are generated by written procedures. Additional invariants can be added to verify correctness in the generated snapshot.

If you would like to learn more about the Generator please have a look into the following papers.

ASSL - A Snapshot Sequence Language
Validation of UML and OCL Models by Automatic Snapshot Generation

(back)

Minor changes
For a complete list of changes and bug fixes see the NEWS and ChangeLog files.

Home|People|Teaching|Publications
Last change: 02.08.2006 by Fabian Buettner (green@informatik.uni-bremen.de)