def test_legend_1_0_2(self):
     set_params()
     actual1 = evaluate_guess('{a}lo1({f}and(xor({b}{c}){d}){e})xor({g}{h})',
                             LogInfo('v21a81391l17.csv'), dict(), 6300)
     actual2 = evaluate_guess('{a}lo1({f}and(xor({b}{c}){d}){e})opt({h})opt({g})',
                             LogInfo('v21a81391l17.csv'), dict(), 6300)
     self.assertTrue(actual1[0] > actual2[0])
 def test_9_9_9_6(self):
     set_params()
     actual = evaluate_guess(
         'and(xor(opt(lop({f}))xor(and({e}{a}seq({c}{d})opt({g}))and({b}{h}){g})'
         'xor(xor(and({e}{a}seq({c}{d}))opt({b}))xor(xor(opt({c})lop({c}))seq({b}{d}))))opt({h}))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_9_9_7(self):
     set_params()
     actual = evaluate_guess(
         'xor(and(seq(xor({c}xor(seq({b}{d}){c}))xor({f}{e}))xor({a}{b}))'
         'seq(xor({h}xor({e}and({d}{a})))xor({a}opt({c}))))opt(xor({g}{h}{c}{f}))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_9(self):
     set_params()
     actual = evaluate_guess(
         '{a}and(seq(xor(seq(lop({c})opt({c})){b}){d})lop(seq({f}{d})))'
         'xor({e}seq({e}{g}))xor({h}seq({c}and({c}{h})))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_9_9_5(self):
     set_params()
     actual = evaluate_guess(
         'xor({f}{a})xor({e}seq({g}opt({b}){h})and(opt({e})seq({b}{d})))'
         'xor(seq({h}opt(xor(seq({f}{g})seq({h}{c}{d}))))'
         'seq(xor(seq({b}{d}){e}opt({d}))xor(and(lop({e}{d}){e}){g})))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_legend4(self):
     set_params()
     actual = evaluate_guess('xor(seq({a}{c}{d}{e}{h})'
                             'seq({a}{b}{d}{e}{g})'
                             'seq({a}{d}{c}{e}{h})'
                             'seq({a}{b}{d}{e}{h})'
                             'seq({a}{c}{d}{e}{g})'
                             'seq({a}{d}{c}{e}{g})'
                             'seq({a}{d}{b}{e}{h})'
                             'seq({a}{c}{d}{e}{f}{d}{b}{e}{h})'
                             'seq({a}{d}{b}{e}{g})'
                             'seq({a}{c}{d}{e}{f}{b}{d}{e}{h})'
                             'seq({a}{c}{d}{e}{f}{b}{d}{e}{g})'
                             'seq({a}{c}{d}{e}{f}{d}{b}{e}{g})'
                             'seq({a}{d}{c}{e}{f}{c}{d}{e}{h})'
                             'seq({a}{d}{c}{e}{f}{d}{b}{e}{h})'
                             'seq({a}{d}{c}{e}{f}{b}{d}{e}{g})'
                             'seq({a}{c}{d}{e}{f}{b}{d}{e}{f}{d}{b}{e}{g})'
                             'seq({a}{d}{c}{e}{f}{d}{b}{e}{g})'
                             'seq({a}{d}{c}{e}{f}{b}{d}{e}{f}{b}{d}{e}{g})'
                             'seq({a}{d}{c}{e}{f}{d}{b}{e}{f}{b}{d}{e}{h})'
                             'seq({a}{d}{b}{e}{f}{b}{d}{e}{f}{d}{b}{e}{g})'
                             'seq({a}{d}{c}{e}{f}{d}{b}{e}{f}{c}{d}{e}{f}{d}{b}{e}{g}))',
                             LogInfo('v21a81391l17.csv'), dict(), 2100)
 def test_legend3(self):
     set_params()
     actual = evaluate_guess('{a}lop(opt({b}{c}{d}{e}{f}))xor({g}{h})', LogInfo('v21a81391l17.csv'),
                             dict(), 2100000000000)
 def test_legend2(self):
     set_params()
     actual = evaluate_guess('{a}{c}{d}{e}{h}', LogInfo('v21a81391l17.csv'),
                             dict(), 2100)
 def test_legend_1_7(self):
     set_params()
     actual = evaluate_guess('xor({a}and(xor({b}{c}){d}){e}lop({f}and(xor({b}{c}){d}){e})xor({g}{h}))',
                             LogInfo('v21a81391l17.csv'), dict(), 2100000)
 def test_9_9_9_9_6(self):
     set_params()
     actual = evaluate_guess(
         'seq({a})xor({b}{f}{c}){d}and(xor({h}xor(and(xor(and({c})))lo0(xor({b}{f}{d}{g})))){e})opt({h})',
         LogInfo('v8a7c1254l5.csv'), dict(), 2100)
     expected = 0
 def test_9_4(self):
     set_params()
     actual = evaluate_guess(
         'and(xor({b}seq(opt({h})opt({c})opt({f})){c}){e}seq(opt({h}){a}{b}{d}))opt({g})',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_1(self):
     set_params()
     actual = evaluate_guess('lop(seq(lop({g}){a}))lop({f})opt({d})lop({d}){b}lop(opt({h}opt({e}{c})))',
                             LogInfo('v21a81391l17.csv'), dict(), 2100)
 def test_9_9_9_9_9_2(self):
     set_params()
     actual = evaluate_guess('{a}xor({f}{b})opt(lo1(and({g}xor({f}{b})){d}){c}{d})and(seq({e}))',
                             LogInfo('v45a7c1000l14.csv'),
                             dict(), 2100)
 def test_9_9_9_9_9_1(self):
     set_params()
     actual = evaluate_guess('{a}and({d}xor({f}{b}){c})lo3(opt(xor(opt({d})){b}xor({g}))){e}',
                             LogInfo('v45a7c1000l14.csv'),
                             dict(), 2100)
 def test_9_9_9_9_9_0(self):
     set_params()
     actual = evaluate_guess('{a}xor(and(seq(and({f}))){b})and({d}opt(lo3(and({f}{g}{d}))))lo1({g}{e})',
                             LogInfo('v45a7c1000l14.csv'),
                             dict(), 2100)
 def test_no_exceptions_6(self):
     set_params()
     evaluate_guess('xor(and({c}and(and({c}{b}and({d}{f})){b}{e})){e}{e})', LogInfo('v21a81391l17.csv'),
                    dict(), 2100)
 def test_9_9_9_9_9(self):
     set_params()
     actual = evaluate_guess('{a}lo3(and({f}{g}{d}))xor({b}{f})opt({c}{d}){e}',
                             LogInfo('v45a7c1000l14.csv'),
                             dict(), 2100)
 def test_9_9_9_9_8(self):
     set_params()
     actual = evaluate_guess('{a}lo3(lo3(opt({d}))and({d}))opt({c}{b}){e}',
                             LogInfo('v8a5c40l5.csv'),
                             dict(), 2100000000000)
 def test_9_9_9_9_7(self):
     set_params()
     actual = evaluate_guess('{a}lo0(and({c}{b}))opt(seq({e}{f}))lo4(and({c}{b})){d}',
                             LogInfo('v6a6c13l12.csv'),
                             dict(), 2100)
 def test_no_exceptions_8(self):
     set_params()
     evaluate_guess('and({a}{f}opt(and({b}{e}lop({c}))){d})', LogInfo('v21a81391l17.csv'), dict(), 2100)
 def test_no_exceptions_9(self):
     set_params()
     evaluate_guess('and(xor({a}{f}{g}and({b}and(and({d}{c}){e}{f})))opt({d}))'
                    'and(xor(opt({f}{h})and(and({d}{g})and({b}opt({e})))){h})',
                     LogInfo('v21a81391l17.csv'), dict(), 2100)
 def test_9_6(self):
     set_params()
     actual = evaluate_guess(
         'and(lop({c}{d}){a})and({h}seq(and(opt({f}{d}{b})opt({c}))opt({g}){e}))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_2(self):
     actual = evaluate_guess('xor(opt({f})and(and({h}and({d}{c}{e}))opt({b}){a})'
                             'and(opt(and({h}and({b}{c}{a})){g}){a}))',
                             LogInfo('v21a81391l17.csv'), dict(), 2100)
 def test_9_8(self):
     set_params()
     actual = evaluate_guess(
         '{a}{c}opt(seq(and({f}{b}){e}))opt(seq(and({f}{b}){e})){d}xor(opt({g})and({e}{h}))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_5(self):
     set_params()
     actual = evaluate_guess(
         'and({a}and(and(opt({b})opt(seq(opt({f}){g})))lop(and({c}{d}){e})))opt({h})',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_9_9_9_9_5(self):
     set_params()
     actual = evaluate_guess(
         '{a}and({d})xor({b})xor(xor(opt(seq(seq({a}xor({a}seq({h}))and({h}{f})){h}))){h}{a}seq(opt({h})xor({c})and(and({h})opt({h}))){g}and(xor(lo2(and(and({g})))){e}))opt({h})',
         LogInfo('v8a7c1254l5.csv'), dict(), 2100)
     expected = 0
 def test_9_7(self):
     set_params()
     actual = evaluate_guess(
         '{a}and(and(opt({e})seq(xor({d}{e}){b}))xor(opt({g})xor(xor({h}xor({f}{h}))xor({f}and(and({c}{h}){a})))))',
         LogInfo('v21a81391l17.csv'), dict(), 2100)
     expected = 0
 def test_legend_1_1(self):
     set_params()
     actual = evaluate_guess('{a}and(xor({b}{c}){d}){e}lop({f}and(xor({b}{c}){d}){e})xor({g}{h})',
                             LogInfo('v21a81391l17.csv'), dict(), 2100)
     self.assertTrue(actual[0] > 0.985)
예제 #29
0
from process_discovery.evaluation.metrics_calculation import evaluate_guess
from process_discovery.log.log_util import LogInfo
from test.util.test_util import set_params

set_params()
actual = evaluate_guess(
    '{a}{b}{c}osq(opt(lop(opt({d}{e}{f}))seq(lo1({f}{g}{h}{m}){i}))xor({j}{l}{n}{o}{p}){k})',
    LogInfo('v846a16c1050l185.csv'), dict(), 63000)
print(actual)
expected = 0
 def test_no_exceptions_7(self):
     set_params()
     evaluate_guess('lop({c})', LogInfo('v21a81391l17.csv'), dict(), 2100)