Viewing (view.rsl)

(***
*
*Module databases defines the objects and operations related to viewing the different scheduling categories available to the user.
*
*)

object CourseView is Title and Description and Sections and Type and Units and WTUs;
object InstructorView is LastName and FirstName and MiddleName and Degree and Handicap;
object ClassroomView is Building and Room and Size and Location and Handicap and Lab and Resources;
object ScheduleView is Course and Sec and Type and Call and Instructor and Days and Starts and stops and Room;

operation ViewCourses is
inputs: cdb:CourseDB;
outputs: cvl':CourseView*;
precondition: (* none *);
postcondition: (forall (cs:Course in cdb) exists (cv:CourseView in cvl') (cs.Title = cvl'.Title)) and #cdb = #cvl';
end ViewCourses;

operation ViewInstructors is
inputs: idb:InstructorDB;
outputs: ivl':InstructorView*;
precondition: (* none *);
postcondition: (forall (inst:Instructor in idb) exists (instv:InstructorView in ivl') (inst.Title = ivl'.Title)) and #idb = #ivl';
end ViewCourses;

operation ViewClassrooms is
inputs: crdb:ClassroomDB;
outputs: crvl':ClassroomView*;
precondition: (* none *);
postcondition: (forall (cr:Classroom in crdb) exists (crv:CourseView in crvl') (cr.Title = crvl'.Title)) and #crdb = #crvl';
end ViewCourses;

operation ViewSchedule is
inputs: sdb:ScheduleDB;
outputs: svl':ScheduleView*;
precondition: (* none *);
postcondition: (forall (sch:Schedule in sdb) exists (schv:ScheduleView in svl') (sch.CallNum = svl'.CallNum)) and #sdb = #svl';
end ViewCourses;


Prev: schedule.rsl | Next: file.rsl | Up: spec | Top: index