1 / 19

CS 501: Software Engineering Fall 1999

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.

frame
Download Presentation

CS 501: Software Engineering Fall 1999

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 501: Software EngineeringFall 1999 Lecture 8 Formal Specification II

  2. Administration Assignment 2: Instructions for submitting Assignment 2

  3. Schemas Schema:  The basic unit of formal specification.  Describes admissible states and operations of a system.

  4. 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.

  5. 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.

  6. LibSys Level of Detail: Assume given sets: Copy, Book, Reader Global constant: maxloans

  7. 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}

  8. < 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

  9. < Schema Inclusion LibDB stock : Copy Book readers: FReader LibLoans issued : Copy Reader shelved : FCopy r : Reader• #(issued {r}) maxloans shelved dom issued = Ø

  10. Schema Inclusion (continued) Library LibDB LibLoans dom stock = shelved dom issued ran issued  readers

  11. 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!

  12. 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

  13. 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

  14. < < 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

  15. Schema Decoration Issue Library Library' c? : Copy; r? : Reader c? shelved; r?  readers #(issued {r?}) < maxloans issued' = issued  {c? r?} stock' = stock; readers' = readers

  16. Schema Decoration Issue Library c? : Copy; r? : Reader c? shelved; r?  readers #(issued {r?}) < maxloans issued' = issued  {c? r?} stock' = stock; readers' = readers

  17. ^ ^ = = The Schema Calculus Schema inclusion Schema decoration Schema disjunction: AddCopy AddKnownTitle  AddNewTitle Schema conjunction: AddCopyEnterNewCopy  AddCopyAdmin Schema negation Schema composition

  18. Requirements Definition and Analysis Requirements Definition System and Software design Implementation and Unit Testing Integration and System Testing Operation and Maintenance

  19. Feasibility Study Requirements Analysis Requirements Specification Requirements Definition The Requirements Process Feasibility Report System Models Definition of Requirements Specification of Requirements Requirements Document

More Related