Ejemplo n.º 1
0
def run(fct):
  false = []
  mypath = "DataAutomate"

  count = 0
  for f in listdir(mypath):
      if isfile(join(mypath, f)):
          count += 1
	  sys.stdout.write(f+"	")
          a = Automate.importFromFile(join(mypath, f))
          #print a
          
          oracle = Oracle(a)
          alphabet = a.getAlphabet()
          l_star = L_star(alphabet, oracle)
                
          if fct == "run":
            res = l_star.run()
          elif fct == "run_without_equivalence":
            res = l_star.run_without_equivalence()        
          
          if not res:
            false.append(f)

  print "##", len(false), '/', count, false
Ejemplo n.º 2
0
def run(fct):
    false = []
    mypath = "DataAutomate"

    count = 0
    for f in listdir(mypath):
        if isfile(join(mypath, f)):
            count += 1
            sys.stdout.write(f + "	")
            a = Automate.importFromFile(join(mypath, f))
            #print a

            oracle = Oracle(a)
            alphabet = a.getAlphabet()
            l_star = L_star(alphabet, oracle)

            if fct == "run":
                res = l_star.run()
            elif fct == "run_without_equivalence":
                res = l_star.run_without_equivalence()

            if not res:
                false.append(f)

    print "##", len(false), '/', count, false
Ejemplo n.º 3
0
#coding:utf-8
from Classe_Automate import *
from L_star import *

from os import listdir
from os.path import isfile, join
            

a = Automate.importFromFile("DataAutomate/141_Cambodian.fsa.att")

oracle = Oracle(a)
alphabet = a.getAlphabet()
l_star = L_star(alphabet, oracle)


#l_star.run()
l_star.run_without_equivalence()