Title: Towards Overcoming Deficiencies in Constraint Diagrams
1Towards Overcoming Deficiencies in Constraint
Diagrams
- Gem Stapleton and Aidan Delaney
- Supported by the Leverhulme Trust and the EPSRC
www.cmis.brighton.ac.uk/research/vmg
2Background
- Formal specification
- Safety critical
- Invariants
- Operation contracts
- UML -gt OCL
- Constraint diagrams (Kent, 1997)
3Background
- Invariant Members can only borrow Films from the
collections of Stores that they have joined
4Background
- Gurr and Tourlas, Towards the Principled Design
of Software Engineering Diagrams, 2000 - Studies have indicated that the most effective
representations are those which are well-matched
to what they represent - Q Are constraint diagrams an effective
representation?
5Well-Matchedness and Reasoning
- Well-matched
- Mirroring of semantic properties
- Accuracy of interpretation
- Ease with which constraint enforced
- Reasoning
- About the model
- Determining an implementation
- Proof of correctness
6Contributions
- Partly well-matched
- Expose counter-intuitive features
- Reading
- Writing
- Reasoning
- Propose generalized constraint diagrams
- Discuss design philosophy
7Overview of Constraint Diagrams
universal spider
zones minimal regions arrows contours given
vs derived
habitat
domain
8Overview of Constraint Diagrams
reading tree
existential spiders
shading
9Overview of Constraint Diagrams
There is a film, p, of which every store, q, has
two copies, r and s.
10Overview of Constraint Diagrams
valid
invalid
A tree is valid if it allows us to make
statements relating elements when the diagram
requires it
11Summary of syntax
- Euler diagrams
- Existential spiders
- Universal spiders
- Shading
- Arrows
- Derived contours
- Reading trees (directed)
- Formalized by Fish et al, JVLC 2005
12Well-matched features
- Euler diagrams
- Mirror subset and disjointness relations
Euler diagrams
13Well-matched features
- Spiders
- Mirror set membership by containment
- Mirror distinctness by distinctness
Spider diagram
14Well-matched features
- Shading
- nothing else is present -- fills out region
Spider diagram
15Well-matched features
- Shading
- nothing else is present -- fills out region
Enables exploitation of desirable properties
16Well-matched features
- Arrows
- Mirrors a is related to b by having source a
and target b
17Well-matched features
- Derived contours
- Similar to Euler diagrams
18Well-matched features
- Reading trees
- Indicate quantifier order using directed edges
19Well-Matchedness and Reasoning
- Well-matched
- Mirroring of semantic properties
- Accuracy of interpretation
- Ease with which constraint enforced
- Reasoning
- About the model
20Reading constraints
- Habitat differs from domain
- Unhelpful symmetry
21Reading constraints
- Shading inside quantification
- Inexplicit reading order
22Reading constraints
- Fish and Masthoff (VLHCC 05)
- Start at left most spider
- Prioritise domain habitat
- Follow arrows
This diagram violates all these preferences
23Reading constraints summary
- Decipher spider domain
- Inexplicit reading order of some syntax
- Reading order has profound impact on semantics
- Illustrates lack of modularity
- Empirical evidence suggests some diagrams are not
intuitive
24Writing constraints
- Expressiveness limitations
- First order language
- Distinctness of elements
- Disjunction issues involving binary relations
How do we express Every film has a lead actor
or no actors
25Writing constraints
How do we express Every film has a lead actor
or no actors Attempt
26Writing constraints
How do we express There is a film that has a
lead actor and a director Attempt 1
27Writing constraints
How do we express There is a film that has a
lead actor and a director Attempt 2
28Reasoning
- Conjunction vs disjunction
and
29Reasoning
- Conjunction vs disjunction
or
30Observations
- Individual pieces of syntax well-matched
- Reading constraints variety of problems
- Writing constraints expressiveness limits
- Reasoning discrepancy, non-intuitiveness
- Q Can we improve the notation to overcome the
deficiencies?
31Generalized Constraint Diagrams
- Design principles
- Well-matched syntax mirrors semantics
- Explicit information ease of meaning extraction
- Consistency syntax has fixed meaning
- Expressiveness naturalness of assertion
- Simple construction rules wfd
- Considered impact on reasoning
32Generalized Constraint Diagrams
- Utilize existing syntactic components
- Remove need for reading tree
- View a diagram as a partial order
- Extends building sequence (Fish et al)
-
33Generalized Constraint Diagrams
34Generalized Constraint Diagrams
- Fixing habitat not equal to domain
Every member can borrow a set of films
and every one of those films is available to
that member
35Generalized Constraint Diagrams
- Fixing shading in scope and explicit quantifier
ordering
Every film has a set of lead actors
and there is exactly one actor
36Generalized Constraint Diagrams
- Fixing for all and or issues
has a lead actor
Every film
OR
has no actors
37Generalized Constraint Diagrams
- Not enforcing distinctness
can borrow a film
There is a member that
AND
has borrowed a film
38Conclusion
- Constraint diagrams have good aspects
- Constraint diagrams have deficiencies
- Proposed generalization
- Next steps
- Formalize syntax and semantics
- Conjecture expressiveness increased
- Fully explore well-matchedness
- Investigate second-order extension
www.cmis.brighton.ac.uk/research/vmg
39- September 19 21, 2008
- Herrsching, Germany
- www.cmis.brighton.ac.uk/diagrams2008
40Reasoning
41Generalized Constraint Diagrams
- Fixing reasoning with zones
New syntax forces scoping