Exemplo n.º 1
0
def get_prover(url=None, group=None, path=None):
    """ Factory that determines what prover to serve. 
  """
    if path:
        return Coq_Local(path)
    elif (url and group):
        return ProofWeb(url, group)
    elif local_which("coqtop"):
        return Coq_Local(local_which("coqtop"))
    else:
        return Prover()
Exemplo n.º 2
0
    def test_slow(self):
        """ Test that a slow script gets processed correctly. """
        prover = Coq_Local("/usr/local/bin/coqtop")
        self._reader.add_code("""Require Import Arith.
Lemma loop x y : x + y = y + x.
intros.
Fail Timeout 2 repeat rewrite plus_comm.
apply plus_comm.
Qed. 
    """)
        movie = self._reader.make_frames(prover=prover)
        self.assertTrue(movie.getFrame(3).getResponse())
Exemplo n.º 3
0
 def test_arguments(self):
   """ Passing arguments in the coqtop string should work. """
   Coq_Local(coqtop = '/usr/local/bin/coqtop -R /path ""')
Exemplo n.º 4
0
 def setUp(self):
   """ Setup local Coq session. """
   self._coq = Coq_Local(coqtop = "/usr/local/bin/coqtop")