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" ]
c0_Person abstract Person c0_Person->c0_Person husband c0_Person->c0_Person wife c0_ada ada : Person c0_ada->c0_Person c0_cyd cyd : Person c0_cyd->c0_Person c0_eve eve : Person c0_eve->c0_Person c0_bob bob : Person c0_bob->c0_Person c0_dan dan : Person c0_dan->c0_Person c0_adaBobCyd adaBobCyd -> Person * c0_adaBobCyd->c0_Person c0_personWithUndefinedHusband1 personWithUndefinedHusband1 -> Person * c0_personWithUndefinedHusband1->c0_Person c0_personWithUndefinedHusband2 personWithUndefinedHusband2 -> Person * c0_personWithUndefinedHusband2->c0_Person c0_personWithNoWife personWithNoWife -> Person * c0_personWithNoWife->c0_Person c0_emptyPersonSet1 emptyPersonSet1 -> Person * c0_emptyPersonSet1->c0_Person c0_emptyPersonSet2 emptyPersonSet2 -> Person * c0_emptyPersonSet2->c0_Person c0_personPair personPair * c0_personPair->c0_Person first c0_personPair->c0_Person second c0_possiblePairs possiblePairs -> personPair * c0_possiblePairs->c0_personPair c0_stringSet1 stringSet1 -> string 3 c0_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: no |

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