benchmark(1, [synthesis]) :-
print_enter_benchmark(1),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv1_contradiction.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(2, [synthesis]) :-
print_enter_benchmark(2),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv2_contradiction.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(3, [synthesis]) :-
print_enter_benchmark(3),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv3_contradiction.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(4, [synthesis]) :-
print_enter_benchmark(4),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv1.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(5, [synthesis]) :-
% contradiction
print_enter_benchmark(5),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv2_contradiction.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(6, [synthesis]) :-
print_enter_benchmark(6),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv3.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(7, [synthesis]) :-
print_enter_benchmark(7),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_inv4.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(8, [synthesis]) :-
print_enter_benchmark(8),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_new_process.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(9, [synthesis]) :-
print_enter_benchmark(9),
setup_scheduler,
preferences:temporary_set_preference(time_out, 10000, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_delete_process.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(10, [synthesis]) :-
print_enter_benchmark(10),
setup_scheduler,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_set_active.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(11, [synthesis]) :-
% Note: DPLL(T) is much faster than ProB if chr_solver preference is set
print_enter_benchmark(11),
preferences:temporary_set_preference(time_out, 15000, OldTimeOut),
setup_scheduler,
load_constraint_from_file(prob_examples('public_examples/Synthesis_Tests/constraints/scheduler_active_to_waiting_precondition.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(12, [alloy]) :-
print_enter_benchmark(12),
alloy2b:load_alloy_ast_prolog_file(prob_examples('public_examples/Alloy/alloy_models/toys/grandpa.als.pl')),
bmachine:b_machine_precompile,
preferences:temporary_set_preference(time_out, 15000, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Alloy/constraints/alloy_self_grandpas.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(16, [alloy]) :-
print_enter_benchmark(16),
alloy2b:load_alloy_ast_prolog_file(prob_examples('public_examples/Alloy/Puzzles/rivercrossing.pl')),
bmachine:b_machine_precompile,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Alloy/constraints/alloy_river_crossing1.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(17, [alloy]) :-
print_enter_benchmark(17),
alloy2b:load_alloy_ast_prolog_file(prob_examples('public_examples/Alloy/Puzzles/rivercrossing.pl')),
bmachine:b_machine_precompile,
preferences:temporary_set_preference(time_out, 20000, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Alloy/constraints/alloy_river_crossing2.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(18, [alloy]) :-
print_enter_benchmark(18),
alloy2b:load_alloy_ast_prolog_file(prob_examples('public_examples/Alloy/Puzzles/rivercrossing.pl')),
bmachine:b_machine_precompile,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Alloy/constraints/alloy_river_crossing3.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(19, [alloy]) :-
print_enter_benchmark(19),
alloy2b:load_alloy_ast_prolog_file(prob_examples('public_examples/Alloy/Puzzles/crewalloc.als.pl')),
bmachine:b_machine_precompile,
preferences:temporary_set_preference(time_out, 10000, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Alloy/constraints/alloy_crewalloc1.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(20, [alloy]) :-
print_enter_benchmark(20),
alloy2b:load_alloy_ast_prolog_file(prob_examples('public_examples/Alloy/Puzzles/crewalloc.als.pl')),
bmachine:b_machine_precompile,
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
load_constraint_from_file(prob_examples('public_examples/Alloy/constraints/alloy_crewalloc2.pl'), Constraint),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).
benchmark(21, [misc]) :-
print_enter_benchmark(21),
preferences:temporary_set_preference(time_out, 2500, OldTimeOut),
Constraint = b(conjunct(b(disjunct(b(disjunct(b(equal(b(identifier(x),integer,[]),b(integer(2),integer,[])),pred,[]),b(equal(b(identifier(y),integer,[]),b(integer(3),integer,[])),pred,[])),pred,[]),b(equal(b(identifier(z),integer,[]),b(integer(4),integer,[])),pred,[])),pred,[]),b(conjunct(b(disjunct(b(not_equal(b(identifier(y),integer,[]),b(integer(3),integer,[])),pred,[]),b(not_equal(b(identifier(x),integer,[]),b(integer(2),integer,[])),pred,[])),pred,[]),b(conjunct(b(disjunct(b(equal(b(identifier(y),integer,[]),b(integer(3),integer,[])),pred,[]),b(not_equal(b(identifier(z),integer,[]),b(integer(4),integer,[])),pred,[])),pred,[]),b(disjunct(b(not_equal(b(identifier(x),integer,[]),b(integer(2),integer,[])),pred,[]),b(equal(b(identifier(z),integer,[]),b(integer(4),integer,[])),pred,[])),pred,[])),pred,[])),pred,[])),pred,[]),
benchmark_constraint(Constraint, FastestSolver, Res, TimeDiff),
asserta(fastest_solver(FastestSolver, Res, TimeDiff)),
preferences:reset_temporary_preference(time_out, OldTimeOut).