OCL Benchmark B1

abstract Person
name : string
civstat : string
gender : string
alive ?
husband -> Person ?
[ parent in this.wife ]
wife -> Person ?
[ parent in this.husband ]
[ civstat = "single" || civstat = "married" || civstat = "divorced" || civstat = "widowed" ]
[ gender = "female" || gender = "male" ]
[ all p : Person | this != p => this.name.ref != p.name.ref ]
[ one p : Person | p.name.ref = this.name.ref ]
ada : Person
[ name = "Ada" ][ civstat = "widowed" ][ gender = "female" ][ alive ][ no husband ][ no wife ]
cyd : Person
[ name = "Cyd" ][ civstat = "married" ][ gender = "male" ][ no alive ][ no husband ][ no wife ]
eve : Person
[ name = "Eve" ][ civstat = "married" ][ gender = "female" ][ alive ][ husband = dan ][ no wife ]
bob : Person
[ name = "Bob" ][ civstat = "divorced" ][ gender = "male" ][ alive ][ no husband ][ no wife ]
dan : Person
[ name = "Dan" ][ civstat = "married" ][ gender = "male" ][ alive ][ no husband ][ wife = eve ]
adaBobCyd -> Person *
[ this.name in stringSet1 ]
[ all p : Person | p.name in stringSet1 => p in adaBobCyd ]
personWithUndefinedHusband1 -> Person *
personWithUndefinedHusband2 -> Person *
personWithNoWife -> Person *
[ no this.wife ]
[ all p : Person | no p.wife => p in personWithNoWife ]
emptyPersonSet1 -> Person *
emptyPersonSet2 -> Person *
[ 1 > 2 ]
personPair *
first -> Person
second -> Person
possiblePairs -> personPair *
[ this.first.gender = "female" && this.first.alive && this.first.civstat != "married" ][ this.second.gender = "male" && this.second.alive && this.second.civstat != "married" ]
[ all p; q : Person | p.gender = "female" && p.alive && p.civstat != "married" && q.gender = "male" && q.alive && q.civstat != "married" => (one pair : personPair | pair.first = p && pair.second = q && pair in possiblePairs) ]
stringSet1 -> string 3
[ this = "Ada" || this = "Bob" || this = "Cyd" ]
stringSet2 -> string 4
[ this = "Ada" || this = "Bob" || this = "Cyd" || this = "Dan" ]
Person abstract Person Person->Person husband Person->Person wife ada ada : Person cyd cyd : Person eve eve : Person bob bob : Person dan dan : Person adaBobCyd adaBobCyd -> Person * adaBobCyd->Person personWithUndefinedHusband1 personWithUndefinedHusband1 -> Person * personWithUndefinedHusband1->Person personWithUndefinedHusband2 personWithUndefinedHusband2 -> Person * personWithUndefinedHusband2->Person personWithNoWife personWithNoWife -> Person * personWithNoWife->Person emptyPersonSet1 emptyPersonSet1 -> Person * emptyPersonSet1->Person emptyPersonSet2 emptyPersonSet2 -> Person * emptyPersonSet2->Person personPair personPair * personPair->Person first personPair->Person second possiblePairs possiblePairs -> personPair * possiblePairs->personPair stringSet1 stringSet1 -> string 3 stringSet2 stringSet2 -> string 4
Module Statistics: | All clafers: 24 | Abstract: 1 | Concrete: 23 | Reference: 16 | Constraints: 29 | Goals: 0 | Global scope: 4..* | Can skip name resolver: yes |

Module Downloads: | [.cfr] | [.html] |