Example #1
0
 def setUp(self):
     self.proofweb = ProofWeb(
         url="http://hair-dryer.cs.ru.nl/proofweb/index.html",
         group="nogroup",
         user="******",
         pswd="anon",
         prover="coq")
Example #2
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()
Example #3
0
class Test_ProofWeb(unittest.TestCase):
  """ Test case exercising the ProofWeb protocol. """

  def setUp(self):
    self.proofweb = ProofWeb(
                        url = "http://hair-dryer.cs.ru.nl/proofweb/index.html",
                        group = "nogroup", user = "******",
                        pswd = "anon", prover = "coq")

  def test_send(self):
    """ Sending correct data to Proofweb should work. """
    self.assertEquals(self.proofweb.send("Goal forall x, x->x."),
                      """1 subgoal

  ============================
   forall x : Type, x -> x
""")

  def test_send_incorrect(self):
    """ Sending incorrect data should give a ProofWeb errror report. """
    self.assertEquals(self.proofweb.send("Bogus."),
                      "Error: Unknown command of the non proof-editing mode.\n")
Example #4
0
class Test_ProofWeb(unittest.TestCase):
    """ Test case exercising the ProofWeb protocol. """
    def setUp(self):
        self.proofweb = ProofWeb(
            url="http://hair-dryer.cs.ru.nl/proofweb/index.html",
            group="nogroup",
            user="******",
            pswd="anon",
            prover="coq")

    def test_send(self):
        """ Sending correct data to Proofweb should work. """
        self.assertEquals(
            self.proofweb.send("Goal forall x, x->x."), """1 subgoal
  
  ============================
   forall x : Type, x -> x
""")

    def test_send_incorrect(self):
        """ Sending incorrect data should give a ProofWeb errror report. """
        self.assertEquals(
            self.proofweb.send("Bogus."),
            "Error: Unknown command of the non proof-editing mode.\n")
Example #5
0
 def setUp(self):
   self.proofweb = ProofWeb(
                       url = "http://hair-dryer.cs.ru.nl/proofweb/index.html",
                       group = "nogroup", user = "******",
                       pswd = "anon", prover = "coq")