Multiplicity Constraints in Signature Declaration - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Multiplicity Constraints in Signature Declaration

Description:

From previous presentation given by Sanjev and Thiranjith. ... Let's consider the example: Father and child. ( Not being sexist here... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 8
Provided by: stude1090
Category:

less

Transcript and Presenter's Notes

Title: Multiplicity Constraints in Signature Declaration


1
Multiplicity Constraints in Signature Declaration
  • By Leon Hsuwei Kao Kevin Pak Kwan Chan

2
From Previous Presentation
  • From previous presentation given by Sanjev and
    Thiranjith. There are multiplicity constraint
    keywords
  • lone for 0 or 1
  • one for exactly 1
  • set for 0 or more
  • However, there is also another multiplicity
    keyword
  • some for 1 or more

3
Question...
  • Question How can we define a specific number for
    the multiplicities?
  • For example
  • 2 or more,
  • 3 or less,
  • Between 4 and 5

4
Example
  • Lets consider the example Father and child.
    (Not being sexist here)
  • Everybody has a father
  • sig Person
  • father lone Father
  • Every father has zero or more children
  • sig Father extends Person
  • children some Person

5
Example continues
  • If a person is a child of someone, then that
    someone is the persons father
  • //symmetric relations
  • fact all fFather, c f.children c.father f

6
Constraints
  • A Father cannot be a child of its children
  • //non reflective transitive closure
  • fact no fFather f in f.children
  • A Person cannot be a father of its ancestor
  • //non reflective transitive closure
  • fact no pPerson p in p.father

7
Example
  • For example, some law got passed that say you
    cannot have more than 2 children otherwise the
    newborns will be killed for population control.
Write a Comment
User Comments (0)
About PowerShow.com