horizon = 12 if args.horizon: horizon = int(args.horizon) now = datetime.now().strftime('%Y-%m-%d_%H:%M:%S') logdir = Path(f'./logs/{problem}_afl_wtraces') logdir.mkdir(parents=True, exist_ok=True) statstracker = StatsTracker( { 'membership_query': 0, 'equivalence_query': 0, 'test_query': 0, 'state_count': 0, 'error_count': 0, 'errors': set() }, log_path=logdir.joinpath(f'{problem}_{now}_afl_wtraces.log'), write_on_change={'state_count', 'error_count'}) sul = RERSSOConnector(path) afl_dir = f'/home/tom/projects/lstar/experiments/learningfuzzing/{problemset}/{problem}' bin_path = f'/home/tom/projects/lstar/experiments/learningfuzzing/{problemset}/{problem}/{problem}' eqc = StackedChecker( AFLEquivalenceCheckerV2(sul, afl_dir, bin_path, feedback='w_traces'), SmartWmethodEquivalenceCheckerV2(sul, horizon=horizon, stop_on={'invalid_input'},
from util.statstracker import StatsTracker sys.path.extend(['/home/tom/projects/lstar']) problem = "Problem13" ct = CounterexampleTracker() # Setup logging statstracker = StatsTracker( { 'membership_query': 0, 'equivalence_query': 0, 'test_query': 0, 'state_count': 0, 'error_count': 0, 'errors': set() }, log_path=f'{problem}_nomutation.log', 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,
# Problem 11 is the easiest training problem from util.statstracker import StatsTracker problem = "Problem13" problemset = 'TrainingSeqReachRers2019' problem_path = path = f"../../../rers/{problemset}/{problem}/{problem}.so" horizon = 12 #og 12 # Setup logging statstracker = StatsTracker( { 'membership_query': 0, 'equivalence_query': 0, 'test_query': 0, 'state_count': 0, 'error_count': 0, 'errors': set() }, log_path=f'{problem}_normal_{horizon}.log', write_on_change={'errors'}) # Setup counterexample tracking ct = CounterexampleTracker() sul = RERSSOConnector(problem_path) # We use a specialized W-method equivalence checker which features # early stopping on invalid inputs, which speeds things up a lot eqc = SmartWmethodEquivalenceCheckerV4(sul, horizon=horizon,