9.2. Rule-based Systems

Consider the kernel specification of the Enrol event:

Enrol(c,s)Candidate State(c)=Admitted;Subject State(s)=Offered;Filled(s)<Quota(s);p=Programme(c);Component State(p,s)=Offered;e=(Current Semester,c,s);Enrolment State(e)=Null;Enrolment State(e)=Enrolled;Mark(e)=null;Filled(s)=Filled(s)+1;Balance Owing(c)=Balance Owing(c)+Fee(s).

image

Now consider some further rules concerning possible errors. First, Candidate State might also be Graduated or Null:

Enrol(c,s)Candidate State(c)=Null;Error.No Such Admission(c).Enrol(c,s)Candidate State(c)=Graduated;Error.Graduated(c).

where Error is a program object that reports errors, ...

Get Systems Analysis and Synthesis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.