CSCI 5828

Foundations of Software Engineering

Course Location
   1B 28

Course Time
   Tuesday and Thursday
   11:00 AM - 12:15 PM

Topics
   What's New (Home)
   Class Schedule
   Lectures
   Assignments
   Contact Information
   Evaluation Criteria

CSCI 5828 Homework 4: Algebraic Specifications

In-Class Due Date: Lecture 15, March 7, 2000

CATECS Due Date: March 14, 2000

Format for Assignment: Plain ASCII text, in the body of an e-mail message

Assignment

For this assignment, you are to complete the algebraic specification for the abstract data type, shown below, by providing the axioms that define their semantics. Note: Has returns TRUE if the given set contains the given item. Cardinality returns the number of elements contained within the set. An empty set contains zero elements.

algebra SetOfItem

imports Boolean, Integer;
introduces
sorts Set, Item;
operations
Create: -> Set;
Add: Set x Item -> Set;
Remove: Set x Item -> Set;
Has: Set x Item -> Boolean
IsEmpty: Set -> Boolean
Cardinality: Set -> Integer;
constrains Create, Add, Remove, Has, IsEmpty, Cardinality so that SetOfItem generated by [Create, Add]
for all [s : SetOfItem, i, j: Item]
...
end SetOfItem


© Ken Anderson, 2000.
Last Updated: 8/16/00; 2:45:41 PM