-- This file is generated from CourseSectionNested.ump --

-- PLEASE DO NOT EDIT THIS CODE --
-- This code was generated using the UMPLE @UMPLE_VERSION@ modeling language! --


-- This defines a NuSMV module for CourseSectionStatus --
MODULE CourseSectionStatus ( _statusOpen )

   -- This part declares state variables for the given NuSMV module --
   VAR
     state : { Status_Planned , Status_Open , Status_Cancelled , Status_Closed };
     event : { ev_cancel , ev_classSizeExceedsMinimum , ev_openRegistration , ev_requestToRegister , ev_classSizeExceedsMaximum , ev_closeRegistration , ev_null };

   -- This part defines macros that summarize the transitions and guards (if any) of the given NuSMV module --
   DEFINE
     status_stable :=  !( event = ev_cancel | event = ev_openRegistration | event = ev_classSizeExceedsMaximum | event = ev_classSizeExceedsMinimum | event = ev_requestToRegister | event = ev_closeRegistration );
     t1 := event = ev_cancel & state = Status_Planned;
     t2 := event = ev_openRegistration & state = Status_Planned;
     t3 := event = ev_cancel & state = Status_Open;
     t4 := event = ev_cancel & state = Status_Closed;
     t5 := event = ev_requestToRegister & _statusOpen.state = StatusOpen_NotEnoughStudents;
     t6 := event = ev_closeRegistration & _statusOpen.state = StatusOpen_NotEnoughStudents;
     t7 := event = ev_classSizeExceedsMinimum & _statusOpen.state = StatusOpen_NotEnoughStudents;
     t8 := event = ev_requestToRegister & _statusOpen.state = StatusOpen_EnoughStudents;
     t9 := event = ev_closeRegistration & _statusOpen.state = StatusOpen_EnoughStudents;
     t10 := event = ev_classSizeExceedsMaximum & _statusOpen.state = StatusOpen_EnoughStudents;

   -- This part defines logic for the assignment of values to state variable "state" of this NuSMV module --
   ASSIGN
     init( state ) := Status_Planned;
     next( state ) := case
       t5 | t2 | t8 | t7 : Status_Open;
       t1 | t6 | t3 | t4 : Status_Cancelled;
       t9 | t10 : Status_Closed;
       TRUE : state;
     esac;

   -- This part defines logic for the assignment of values to state variable "event" of this NuSMV module --
   ASSIGN
     init( event ) := ev_null;
     next( event ) := case
       status_stable : { ev_cancel , ev_classSizeExceedsMinimum , ev_openRegistration , ev_requestToRegister , ev_classSizeExceedsMaximum , ev_closeRegistration };
       TRUE : ev_null;
     esac;

-- This defines a NuSMV module for CourseSectionStatusOpen --
MODULE CourseSectionStatusOpen ( _status )

   -- This part declares state variables for the given NuSMV module --
   VAR
     state : { StatusOpen_NotEnoughStudents , StatusOpen_EnoughStudents , null };

   -- This part defines logic for the assignment of values to state variable "state" of this NuSMV module --
   ASSIGN
     init( state ) := null;
     next( state ) := case
       _status.t1 | _status.t4 | _status.t6 | _status.t9 | _status.t3 | _status.t5 | _status.t8 | _status.t10 : null;
       _status.t2 : StatusOpen_NotEnoughStudents;
       _status.t7 : StatusOpen_EnoughStudents;
       _status.state = Status_Open & state = null : StatusOpen_NotEnoughStudents;
       TRUE : state;
     esac;

-- This defines a NuSMV module for CourseSectionStatus_Machine --
MODULE CourseSectionStatus_Machine

   -- This part declares state variables for the given NuSMV module --
   VAR
     courseSectionStatus : CourseSectionStatus( courseSectionStatusOpen );
     courseSectionStatusOpen : CourseSectionStatusOpen( courseSectionStatus );

-- This defines a NuSMV module for main --
MODULE main

   -- This part declares state variables for the given NuSMV module --
   VAR
     courseSectionStatus_Machine : CourseSectionStatus_Machine;

   -- The following properties are specified to certify that non-symbolic state(s) of this model is (or are) reachable. 
   CTLSPEC   EF( courseSectionStatus_Machine.courseSectionStatus.state = Status_Planned )
   CTLSPEC   EF( courseSectionStatus_Machine.courseSectionStatus.state = Status_Open )
   CTLSPEC   EF( courseSectionStatus_Machine.courseSectionStatus.state = Status_Cancelled )
   CTLSPEC   EF( courseSectionStatus_Machine.courseSectionStatus.state = Status_Closed )
   CTLSPEC   EF( courseSectionStatus_Machine.courseSectionStatusOpen.state = StatusOpen_NotEnoughStudents )
   CTLSPEC   EF( courseSectionStatus_Machine.courseSectionStatusOpen.state = StatusOpen_EnoughStudents )