write_on_change={'errors'}) # Try to learn a state machine for one of the RERS problems #problem = "Problem12" problemset = "TrainingSeqReachRers2019" sul = RERSSOConnector(f"../../rers/{problemset}/{problem}/{problem}.so") eqc = StackedChecker( # MutationEquivalenceChecker(sul, ct, # target_pop_size=100000, # cluster=False, # ), SmartWmethodEquivalenceCheckerV4(sul, horizon=12, stop_on={'invalid_input'}, stop_on_startswith={'error'}, order_type='ce count')) # Store found counterexamples def onct(ctex): ct.add(ctex) ct.save(f'counterexamples_{problem}_nomutation.p') eqc.onCounterexample(onct) # Set up the teacher, with the system under learning and the equivalence checker teacher = Teacher(sul, eqc)
# Try to learn a state machine for one of the RERS problems problem = "Problem12" problemset = "TrainingSeqReachRers2019" sul = RERSSOConnector(f"../../rers/{problemset}/{problem}/{problem}.so") eqc = StackedChecker( MutationEquivalenceChecker( sul, ct, target_pop_size=10000, #cluster=False, ), SmartWmethodEquivalenceCheckerV4(sul, horizon=9, stop_on={'invalid_input'}, stop_on_startswith={'error'}) # order_type='ce count') ) # Store found counterexamples def onct(ctex): ct.add(ctex) ct.save(f'counterexamples_{problem}.p') eqc.onCounterexample(onct) # Set up the teacher, with the system under learning and the equivalence checker teacher = Teacher(sul, eqc)