1 / 12

Introduction to the Z Example One

Introduction to the Z Example One. Write Z specifications for the Exam Schedule Problem. The Exam Schedule system keeps track of all final exams. It allows you to add, delete, update, and search exams of all courses in the college. Every exam has a specific date.

Télécharger la présentation

Introduction to the Z Example One

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. Introduction to the ZExample One

  2. Write Z specifications for the Exam Schedule Problem • The Exam Schedule system keeps track of all final exams. It allows you to add, delete, update, and search exams of all courses in the college. Every exam has a specific date.

  3. The Z specification should include: • Given Sets • State Schema • Initial State • Operations

  4. The Exam Schedule Z Specification 1. Given Sets [COURSE,DATE]

  5. The Exam Schedule Z Specification • State definition • ExamSchedule • courses: P COURSE • exam: COURSE ⇸DATE • courses = dom exam

  6. The Exam Schedule Z Specification 3. Initial State ExamScheduleInit ExamSchedule courses = Ø

  7. The Exam Schedule Z Specification Operations Add exam Delete exam Find exam Change date

  8. The Exam Schedule Z Specification Operations (AddExam) AddExam  ExamSchedule course? : COURSE date?: DATE course?  courses courses’= courses {course?} exam’ = exam {course?↦ date?}

  9. The Exam Schedule Z Specification Operations (DeleteExam) DeleteExam  ExamSchedule course? : COURSE course? courses courses’= courses\{course?}

  10. The Exam Schedule Z Specification Operations (FindExam) FindExam ExamSchedule course? : COURSE date!: DATE course? courses date! = exam(course?) X

  11. The Exam Schedule Z Specification Operations (ChangeDate) ChangeDate  ExamSchedule course? : COURSE date?: DATE course? courses exam’ = exam {course? ↦date?}

  12. The Exam Schedule Z Specification Operations (ChangeDate) ChangeDate  ExamSchedule course? : COURSE date?: DATE course? courses exam’ = exam {course? ↦date?}

More Related