Пример #1
0
 def test_fault(self):
     with self.assertRaises(util.NoReturn):
         self.ctx.call('@fault')
     pid = util.FreshBitVec('pid', dt.pid_t)
     s = self.state.copy()
     s.procs[s.current].killed = z3.BoolVal(True)
     newstate = spec.switch_proc(s, pid)[1]
     self._prove(z3.Exists([pid], spec.state_equiv(self.ctx, newstate)))
Пример #2
0
 def test_preempt(self):
     with self.assertRaises(util.NoReturn):
         self.ctx.call('@preempt')
     pid = util.FreshBitVec('pid', dt.pid_t)
     newstate = spec.switch_proc(self.state, pid)[1]
     self._prove(z3.Exists([pid], spec.state_equiv(self.ctx, newstate)))