
cond_spy_demo_0 :- (init_demo_series, set_flag(toplevel_module, opium)), opium_printf(help, "\n%w\n\n%w\n\n", [(buggy(nqueens), custom('nqueens_assertions.op'), more('nqueens_assertions.op')), "Goal which initializes the demos of the conditional_spypoints \nscenario. Assertions which should never be broken by the nqueens \nprogram are listed. The buggy nqueens program is loaded in the  \nSepia session, start it there before going on with the demos."]), execute_demo_goal((buggy(nqueens), custom('nqueens_assertions.op'), more('nqueens_assertions.op'))).

:- load_decl(opium_demo(name : cond_spy_demo_0, demo_goal : (buggy(nqueens), custom('nqueens_assertions.op'), more('nqueens_assertions.op')), condition : (init_demo_series, set_flag(toplevel_module, opium)), scenario : conditional_spypoints, message : "Goal which initializes the demos of the conditional_spypoints \nscenario. Assertions which should never be broken by the nqueens \nprogram are listed. The buggy nqueens program is loaded in the  \nSepia session, start it there before going on with the demos.")).

cond_spy_demo_1 :- (nocspy(nqueens / 2, _g10257), nocspy(safe / 1, _g10245)), opium_printf(help, "\n%w\n\n%w\n\n", [(conditional_spy(nqueens / 2, check_nqueens), conditional_spy(safe / 1, check_safe), (spy permutation / 2), show_conditional_spypoints), "Goal which sets conditional spypoints on nqueens/2 and safe/1 using \nthe assertions already listed. It also sets a normal spy point on  \npermutation/2."]), execute_demo_goal((conditional_spy(nqueens / 2, check_nqueens), conditional_spy(safe / 1, check_safe), (spy permutation / 2), show_conditional_spypoints)).

:- load_decl(opium_demo(name : cond_spy_demo_1, demo_goal : (conditional_spy(nqueens / 2, check_nqueens), conditional_spy(safe / 1, check_safe), (spy permutation / 2), show_conditional_spypoints), condition : (nocspy(nqueens / 2, _g10257), nocspy(safe / 1, _g10245)), scenario : conditional_spypoints, message : "Goal which sets conditional spypoints on nqueens/2 and safe/1 using \nthe assertions already listed. It also sets a normal spy point on  \npermutation/2.")).

cond_spy_demo_2 :- goto_np(1), opium_printf(help, "\n%w\n\n%w\n\n", [(set_default(ignore_normal_spypoints), cleap, cleap), "Goal which runs conditional_leap on the buggy program. Note that \nwith the default setting of the ignore_normal_spypoints parameter only \nconditional spypoints are listed by conditional_leap. The checkings do \ntake some time, be patient!"]), execute_demo_goal((set_default(ignore_normal_spypoints), cleap, cleap)).

:- load_decl(opium_demo(name : cond_spy_demo_2, demo_goal : (set_default(ignore_normal_spypoints), cleap, cleap), condition : goto_np(1), scenario : conditional_spypoints, message : "Goal which runs conditional_leap on the buggy program. Note that \nwith the default setting of the ignore_normal_spypoints parameter only \nconditional spypoints are listed by conditional_leap. The checkings do \ntake some time, be patient!")).

cond_spy_demo_3 :- true, opium_printf(help, "\n%w\n\n%w\n\n", [(goto_np(1), set_parameter(ignore_normal_spypoints, [off]), cleap, cleap), "Goal which runs again conditional_leap on the buggy program from the \nbeginning of the execution. This time the ignore_normal_spypoints parameter \nis set to off. Normal spypoints are listed as well."]), execute_demo_goal((goto_np(1), set_parameter(ignore_normal_spypoints, [off]), cleap, cleap)).

:- load_decl(opium_demo(name : cond_spy_demo_3, demo_goal : (goto_np(1), set_parameter(ignore_normal_spypoints, [off]), cleap, cleap), condition : true, scenario : conditional_spypoints, message : "Goal which runs again conditional_leap on the buggy program from the \nbeginning of the execution. This time the ignore_normal_spypoints parameter \nis set to off. Normal spypoints are listed as well.")).

cond_spy_demo_reset :- true, opium_printf(help, "\n%w\n\n%w\n\n", [(set_default(ignore_normal_spypoints), nocspy(nqueens / 2, check_nqueens), nocspy(safe / 1, check_safe), nospy permutation / 2), "Goal which resets the ignore_normal_spypoints parameter and removes \nall spy points."]), execute_demo_goal((set_default(ignore_normal_spypoints), nocspy(nqueens / 2, check_nqueens), nocspy(safe / 1, check_safe), nospy permutation / 2)).

:- load_decl(opium_demo(name : cond_spy_demo_reset, demo_goal : (set_default(ignore_normal_spypoints), nocspy(nqueens / 2, check_nqueens), nocspy(safe / 1, check_safe), nospy permutation / 2), condition : true, scenario : conditional_spypoints, message : "Goal which resets the ignore_normal_spypoints parameter and removes \nall spy points.")).
