Пример #1
0
 def clicouTransformarGR(self):
   try:
     af = self.obterAF()
     af = util.determinizar_af(af)
     self._janela_principal.obterGRGUI().setarGR(util.obter_gramatica_regular(af)) 
   except Exception as excecao:
     self.mostrarErro(str(excecao))
Пример #2
0
 def clicouMinimizar(self):
   try:
     af = self.obterAF()
     afd = util.determinizar_af(af)
     self.setarAF(util.minimizar_afd(afd))
     
   except Exception as excecao:
     self.mostrarErro(str(excecao))
Пример #3
0
 def obterAFD(self):
   automato = self.__constroi_automato(self.__exp_reg)
   automato = util.determinizar_af(automato)
   automato = util.minimizar_afd(automato)
   return automato    
Пример #4
0
 def testDadoUmAFNDRetornaUmAFDEquivalente(self):
   self.assertFalse(self.afnd.ehDeterministico())
   afd = util.determinizar_af(self.afnd)
   self.assertTrue(afd.ehDeterministico())
   self.assertTrue(util.sao_equivalentes_af(self.afnd, afd))