<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Student.ocl</title><link>https://sourceforge.net/p/alloymda/wiki/Student.ocl/</link><description>Recent changes to Student.ocl</description><atom:link href="https://sourceforge.net/p/alloymda/wiki/Student.ocl/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 25 Mar 2012 20:29:26 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/alloymda/wiki/Student.ocl/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Student.ocl modified by Alcino Cunha</title><link>https://sourceforge.net/p/alloymda/wiki/Student.ocl/</link><description>~~~~~
package Student
   context Name
      inv: (Student.allInstances()-&gt;select(v0 | v0.name-&gt;includes(self))-&gt;size() &lt;= 1)
   context Lab
      inv: (Course.allInstances()-&gt;select(v2 | v2.labs-&gt;includes(self))-&gt;size() &lt;= 1)
   context Student
      inv: (not Course.allInstances()-&gt;forAll(v4 | (self.current-&gt;includes(v4) implies self.approved-&gt;includes(v4))))
   context Student
      inv: Course.allInstances()-&gt;forAll(c | (self.approved-&gt;includes(c) implies (Lab.allInstances()-&gt;forAll(v9 | (c.labs-&gt;includes(v9) implies self.donelabs-&gt;includes(v9))) and Grade.allInstances()-&gt;forAll(v13 | (self.exams[c]-&gt;includes(v13) implies ((((v13 = Grade::A) or (v13 = Grade::B)) or (v13 = Grade::C)) or (v13 = Grade::D)))))))
   context Student
      inv: Course.allInstances()-&gt;forAll(v19 | (((self.current-&gt;includes(v19) or self.approved-&gt;includes(v19)) or Grade.allInstances()-&gt;exists(v24 | self.exams[v19]-&gt;includes(v24))) implies College.allInstances()-&gt;exists(v27 | (v27.students-&gt;includes(self) and v27.courses-&gt;includes(v19)))))
   context Student
      inv: (College.allInstances()-&gt;select(v30 | v30.students-&gt;includes(self))-&gt;size() = 1)
   context College::newstudent(s:Student)
      pre: (College.allInstances()-&gt;select(v33 | v33.students-&gt;includes(s))-&gt;size() = 0)
      pre: (s.approved-&gt;size() = 0)
      pre: (s.current-&gt;size() = 0)
      pre: (s.donelabs-&gt;size() = 0)
      pre: (Course.allInstances()-&gt;collect(v45 | s.exams[v45]-&gt;size())-&gt;sum() = 0)
      post: (College.allInstances()-&gt;forAll(v50 | Student.allInstances()-&gt;forAll(v51 | (v50.students-&gt;includes(v51) implies (v50.students@pre-&gt;includes(v51) or ((v50 = self) and (v51 = s)))))) and College.allInstances()-&gt;forAll(v54 | Student.allInstances()-&gt;forAll(v55 | ((v54.students@pre-&gt;includes(v55) or ((v54 = self) and (v55 = s))) implies v54.students-&gt;includes(v55)))))
   context Student::enroll(c:Course)
      pre: (self.current-&gt;size() = 0)
      pre: (not self.approved-&gt;includes(c))
      post: (Student.allInstances()-&gt;forAll(v64 | Course.allInstances()-&gt;forAll(v65 | (v64.current-&gt;includes(v65) implies (v64.current@pre-&gt;includes(v65) or ((v64 = self) and (v65 = c)))))) and Student.allInstances()-&gt;forAll(v68 | Course.allInstances()-&gt;forAll(v69 | ((v68.current@pre-&gt;includes(v69) or ((v68 = self) and (v69 = c))) implies v68.current-&gt;includes(v69)))))
   context Student::lab(l:Lab)
      pre: (self.current-&gt;size() &gt;= 1)
      pre: (not self.donelabs-&gt;includes(l))
      pre: Course.allInstances()-&gt;exists(v79 | (self.current-&gt;includes(v79) and v79.labs-&gt;includes(l)))
      post: (Student.allInstances()-&gt;forAll(v82 | Lab.allInstances()-&gt;forAll(v83 | (v82.donelabs-&gt;includes(v83) implies (v82.donelabs@pre-&gt;includes(v83) or ((v82 = self) and (v83 = l)))))) and Student.allInstances()-&gt;forAll(v86 | Lab.allInstances()-&gt;forAll(v87 | ((v86.donelabs@pre-&gt;includes(v87) or ((v86 = self) and (v87 = l))) implies v86.donelabs-&gt;includes(v87)))))
   context Student::exam(g:Grade)
      pre: (self.current-&gt;size() &gt;= 1)
      pre: (not Course.allInstances()-&gt;forAll(v93 | (self.current-&gt;includes(v93) implies Grade.allInstances()-&gt;exists(v96 | self.exams[v93]-&gt;includes(v96)))))
      post: (Student.allInstances()-&gt;forAll(v99 | Course.allInstances()-&gt;forAll(v100 | Grade.allInstances()-&gt;forAll(v101 | (v99.exams[v100]-&gt;includes(v101) implies (v99.exams@pre[v100]-&gt;includes(v101) or ((v99 = self) and (self.current@pre-&gt;includes(v100) and (v101 = g)))))))) and Student.allInstances()-&gt;forAll(v106 | Course.allInstances()-&gt;forAll(v107 | Grade.allInstances()-&gt;forAll(v108 | ((v106.exams@pre[v107]-&gt;includes(v108) or ((v106 = self) and (self.current@pre-&gt;includes(v107) and (v108 = g)))) implies v106.exams[v107]-&gt;includes(v108))))))
   context Student::approve()
      pre: (self.current-&gt;size() &gt;= 1)
      pre: Grade.allInstances()-&gt;forAll(v116 | (Course.allInstances()-&gt;exists(v117 | (self.current-&gt;includes(v117) and self.exams[v117]-&gt;includes(v116))) implies ((((v116 = Grade::A) or (v116 = Grade::B)) or (v116 = Grade::C)) or (v116 = Grade::D))))
      pre: Lab.allInstances()-&gt;forAll(v122 | (Course.allInstances()-&gt;exists(v123 | (self.current-&gt;includes(v123) and v123.labs-&gt;includes(v122))) implies self.donelabs-&gt;includes(v122)))
      post: (Student.allInstances()-&gt;forAll(v128 | Course.allInstances()-&gt;forAll(v129 | (v128.approved-&gt;includes(v129) implies (v128.approved@pre-&gt;includes(v129) or ((v128 = self) and self.current@pre-&gt;includes(v129)))))) and Student.allInstances()-&gt;forAll(v134 | Course.allInstances()-&gt;forAll(v135 | ((v134.approved@pre-&gt;includes(v135) or ((v134 = self) and self.current@pre-&gt;includes(v135))) implies v134.approved-&gt;includes(v135)))))
      post: (Student.allInstances()-&gt;forAll(v140 | Course.allInstances()-&gt;forAll(v141 | (v140.current-&gt;includes(v141) implies (v140.current@pre-&gt;includes(v141) and (not (v140 = self)))))) and Student.allInstances()-&gt;forAll(v144 | Course.allInstances()-&gt;forAll(v145 | ((v144.current@pre-&gt;includes(v145) and (not (v144 = self))) implies v144.current-&gt;includes(v145)))))
   context Student::quit()
      pre: (self.current-&gt;size() &gt;= 1)
      post: (Student.allInstances()-&gt;forAll(v151 | Course.allInstances()-&gt;forAll(v152 | Grade.allInstances()-&gt;forAll(v153 | (v151.exams[v152]-&gt;includes(v153) implies (v151.exams@pre[v152]-&gt;includes(v153) and (not ((v151 = self) and self.current@pre-&gt;includes(v152)))))))) and Student.allInstances()-&gt;forAll(v158 | Course.allInstances()-&gt;forAll(v159 | Grade.allInstances()-&gt;forAll(v160 | ((v158.exams@pre[v159]-&gt;includes(v160) and (not ((v158 = self) and self.current@pre-&gt;includes(v159)))) implies v158.exams[v159]-&gt;includes(v160))))))
      post: (Student.allInstances()-&gt;forAll(v165 | Lab.allInstances()-&gt;forAll(v166 | (v165.donelabs-&gt;includes(v166) implies (v165.donelabs@pre-&gt;includes(v166) and (not ((v165 = self) and Course.allInstances()-&gt;exists(v169 | (self.current@pre-&gt;includes(v169) and v169.labs-&gt;includes(v166))))))))) and Student.allInstances()-&gt;forAll(v172 | Lab.allInstances()-&gt;forAll(v173 | ((v172.donelabs@pre-&gt;includes(v173) and (not ((v172 = self) and Course.allInstances()-&gt;exists(v175 | (self.current@pre-&gt;includes(v175) and v175.labs-&gt;includes(v173)))))) implies v172.donelabs-&gt;includes(v173)))))
      post: (Student.allInstances()-&gt;forAll(v179 | Course.allInstances()-&gt;forAll(v180 | (v179.current-&gt;includes(v180) implies (v179.current@pre-&gt;includes(v180) and (not (v179 = self)))))) and Student.allInstances()-&gt;forAll(v183 | Course.allInstances()-&gt;forAll(v184 | ((v183.current@pre-&gt;includes(v184) and (not (v183 = self))) implies v183.current-&gt;includes(v184)))))
endpackage
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alcino Cunha</dc:creator><pubDate>Sun, 25 Mar 2012 20:29:26 -0000</pubDate><guid>https://sourceforge.net012e7051668013ef2ad1ea21cfa91a29032b136d</guid></item></channel></rss>