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))
def testReconheceOEpsilonComoCaracterEspecialEGeraUmAutomatoMinimoQueGeraEpsilon(self): exp = ExpressaoRegular(EPSILON) self.assertTrue(util.sao_equivalentes_af(exp.obterAFD(), construirAFDQueGeraEpsilon()))
def testSeUmAFDPossuiApenasUmEstadoEleJaEhMinimo(self): afd = construirAFDQueGeraEpsilon() self.assertTrue(afd.ehMinimo())