190 likes | 210 Views
This document provides instructions for submitting Assignment 2 on Formal Specification II Administration. It includes information on schemas and an example of a Z library system.
E N D
CS 501: Software EngineeringFall 1999 Lecture 8 Formal Specification II
Administration Assignment 2: Instructions for submitting Assignment 2
Schemas Schema: The basic unit of formal specification. Describes admissible states and operations of a system.
LibSys: An Example of Z Library system: Stock of books Registered users. Each copy of a book has a unique identifier. Some books on loan; other books on shelves available for loan. Maximum number of books that any user may have on loan.
LibSys: Operations Issue a copy of a book to a reader. Reader return a book. Add a copy to the stock. Remove a copy from the stock. Inquire which books are on loan to a reader. Inquire which readers has a particular copy of a book. Register a new reader. Cancel a reader's registration.
LibSys Level of Detail: Assume given sets: Copy, Book, Reader Global constant: maxloans
Domain and Range ran m X dom m Y y x m : X Y dom m = { x X : y Y x y} ran m = { y Y : x X x y}
< LibSys: Schema for Abstract States Library stock : CopyBook issued : CopyReader shelved : FCopy readers: FReader shelved dom issued = dom stock shelved dom issued = Ø ran issued readers r : readers• #(issued {r}) maxloans
< Schema Inclusion LibDB stock : Copy Book readers: FReader LibLoans issued : Copy Reader shelved : FCopy r : Reader• #(issued {r}) maxloans shelved dom issued = Ø
Schema Inclusion (continued) Library LibDB LibLoans dom stock = shelved dom issued ran issued readers
Schemas Describing Operations Naming conventions for objects: Before: plain variables, e.g., r After: with appended dash, e.g., r' Input: with appended ?, e.g., r? Output: with appended !, e.g., r!
Operation: Issue a Book Inputs: copy c?, reader r? Copy must be shelved initially: c? shelved Reader must be registered: r? readers Reader must have less than maximum number of books on loan: #(issued {r?}) < maxloans Copy must be recorded as issued to the reader: issued' = issued {c? r?} The stock and the set of registered readers are unchanged: stock' = stock; readers' = readers
Operation: Issue a Book stock, stock' : Copy Book issued, issued' : Copy Reader shelved, shelved': FCopy readers, readers' : FReader c?: Copy; r? :Reader [See next slide] Issue
< < Operation: Issue a Book (continued) Issue [See previous slide] shelved dom issued = dom stock shelved' dom issued' = dom stock' shelved dom issued = Ø; shelved' dom issued' = Ø ran issued readers; ran issued' readers' r : readers #(issued {r}) maxloans r : readers' #(issued' {r}) maxloans c? shelved; r? readers; #(issued {r?}) < maxloans issued' = issued {c? r?} stock' = stock; readers' = readers
Schema Decoration Issue Library Library' c? : Copy; r? : Reader c? shelved; r? readers #(issued {r?}) < maxloans issued' = issued {c? r?} stock' = stock; readers' = readers
Schema Decoration Issue Library c? : Copy; r? : Reader c? shelved; r? readers #(issued {r?}) < maxloans issued' = issued {c? r?} stock' = stock; readers' = readers
^ ^ = = The Schema Calculus Schema inclusion Schema decoration Schema disjunction: AddCopy AddKnownTitle AddNewTitle Schema conjunction: AddCopyEnterNewCopy AddCopyAdmin Schema negation Schema composition
Requirements Definition and Analysis Requirements Definition System and Software design Implementation and Unit Testing Integration and System Testing Operation and Maintenance
Feasibility Study Requirements Analysis Requirements Specification Requirements Definition The Requirements Process Feasibility Report System Models Definition of Requirements Specification of Requirements Requirements Document