예제 #1
0
 def testPodeConstruirUmAutomatoQueGeraApenasEpsilon(self): 
   afd = construirAFDQueGeraEpsilon()
   afd2 = util.gerar_automato_finito_epsilon()
   afd3 = util.gerar_automato_finito('a')
   
   self.assertTrue(util.sao_equivalentes_af(afd, afd2))
   self.assertFalse(util.sao_equivalentes_af(afd, afd3))
예제 #2
0
 def testReconheceOEpsilonComoCaracterEspecialEGeraUmAutomatoMinimoQueGeraEpsilon(self):
     exp = ExpressaoRegular(EPSILON)
     self.assertTrue(util.sao_equivalentes_af(exp.obterAFD(), construirAFDQueGeraEpsilon()))
예제 #3
0
 def testSeUmAFDPossuiApenasUmEstadoEleJaEhMinimo(self):
   afd = construirAFDQueGeraEpsilon()
   self.assertTrue(afd.ehMinimo())