list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

W228 Different Initial States

Umple semantic error related to composing state machines or regions

If two state machines or regions are being composed and do not the same initial states.

Example

// In this example, there is an warning
// because two traits T1 and T2 have
// state machines with the same name but
// with different initial states.
trait T1{
  sm{
    s1{ e1 ->  s2;}
    s2{ e3 ->  s3;}
    s3{ e2 ->  s2;}
  }
}
trait T2{
  sm{
    t1{ t1 ->  t2;}
    t2{ t3 ->  s3;}
    s3{ t2 ->  t2;}
  }
}
class C1{
  isA T1,T2;
}
      

Load the above code into UmpleOnline