Download presentation
Presentation is loading. Please wait.
Published byLeslie Doyle Modified over 9 years ago
1
17 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal Methods Schema Operators Part1
2
17 May 2009Instructor: Tasneem Darwish2 Outlines Conjunction Decoration Disjunction Negation
3
17 May 2009Instructor: Tasneem Darwish3 Conjunction We may combine the information contained in two schemas using conjunction the conjunction of the previous two schemas is as follows: If the same variable is declared in both schemas, then the types must match, or the schema S ^ T will be undefined.
4
17 May 2009Instructor: Tasneem Darwish4 Conjunction Example 12.1 Our theatre company presents premieres: special performances of new productions. Only those customers who have signed up as friends of the theatre may buy seats for these shows. To include this information in our formal description, we add a new variable of type Status: Status == {Premiere, Standard} a set friends represent the set of all customers who are currently registered as friends of the theatre.
5
17 May 2009Instructor: Tasneem Darwish5 Conjunction Example 12.1
6
17 May 2009Instructor: Tasneem Darwish6 Conjunction We may also conjoin two schemas by including one in the declaration part of the other Example 12.2 The friendly box office could have been introduced by including BoxOffice in the declaration part of a schema: or by including both BoxOffice and Friends:
7
17 May 2009Instructor: Tasneem Darwish7 Decoration Example 12.6 One operation upon the state of the box office system is the purchasing of a single seat for the current performance. Suppose that this seat is denoted by s?, and that the customer buying it is c?. If the operation is to be a success, then s? must be available for sale beforehand: Afterwards, the sold relation should be modified to indicate that s? has been sold to customer c? Finally, the collection of seats allocated for this performance should be unchanged by the operation.
8
17 May 2009Instructor: Tasneem Darwish8 Decoration Some operations, involve either input to the system or output from it. If a component represents an input, then its name should end with a query (?); if it represents output, then its name should end with a shriek (!) Example 12.7 The operation of purchasing a seat requires two inputs: the name of the seat, and the name of the customer
9
17 May 2009Instructor: Tasneem Darwish9 Decoration If Schema describes the state of a system, then ∆Schema is a schema including both Schema and Schema’: Example 12.9 The operation schema Purchase0 could include ∆BoxOffice in place of BoxOffice and BoxOffice’:
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.