MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit 37da4524 authored by BARGAIN Orianne's avatar BARGAIN Orianne
Browse files

finish bottom minimisation and tests

parent 97aec902
......@@ -155,13 +155,6 @@ read_lines(Out, Solution) :-
read_line_to_codes(Out, Line1),
read_lines(Line1, Out, Solution).
/*
read_lines(end_of_file, _, []) :- !.
read_lines(Codes, Out, [Line|Lines]) :-
atom_codes(Line, Codes),
read_line_to_codes(Out, Line2),
read_lines(Line2, Out, Lines).*/
read_lines(end_of_file, _, "") :- !.
read_lines(Codes, _, Solution) :-
atom_codes(Solution, Codes),
......
......@@ -2,13 +2,65 @@
:- begin_tests(sepi).
count(_, [], 0) :- !.
count(Reg, [X|T], N) :-
re_match(Reg, X),
count(Reg, T, N2),
N is N2 + 1.
count(Reg, [Y|T], N) :-
not(re_match(Reg, Y)),
count(Reg, T, N).
test('sepi_fail') :-
search_reduction('library:examples/sepi/MM2.bc', 'library:examples/sepi/MM1.bc').
with_output_to(
atom(Result),
command('search_reduction("library:examples/sepi/MM2.bc", "library:examples/sepi/MM1.bc").')
),
re_matchsub("(?<res>.*)", Result, Sub, []),
Output=Sub.res,
Output = "no sepi found".
test('sepi_success') :-
search_reduction('library:examples/sepi/MM1.bc', 'library:examples/sepi/MM2.bc').
with_output_to(
atom(Result),
command('search_reduction("library:examples/sepi/MM1.bc", "library:examples/sepi/MM2.bc").')
),
re_matchsub("(?<res>.*)", Result, Sub, []),
Output=Sub.res,
Output = "sepi".
test('all_reductions_sucess') :-
with_output_to(
atom(Result),
command('option(all_reductions: yes).
search_reduction("library:examples/sepi/MM1.bc", "library:examples/sepi/MM2.bc").')
),
re_split('\n', Result, Split, []),
count("^sepi", Split, X),
X is 3,
!.
test('bottom_success') :-
with_output_to(
atom(Result),
command('option(min_bottom: yes).
option(all_reductions: no).
search_reduction("library:examples/sepi/MM1.bc", "library:examples/sepi/MM2.bc").')
),
re_split('\n', Result, Split, []),
count(".* -> deleted", Split, X),
X is 1,
!.
test('all_reductions_sucess', [fail]) :-
with_option(all_reductions: yes, search_reduction('library:examples/sepi/MM1.bc', 'library:examples/sepi/MM2.bc')).
test('bottom_fail') :-
with_output_to(
atom(Result),
command('option(min_bottom: yes).
option(all_reductions: no).
search_reduction("library:examples/sepi/MM1.bc", "library:examples/sepi/MM3.bc").')
),
re_matchsub("(?<res>.*)", Result, Sub, []),
Output=Sub.res,
Output = "no sepi found".
:- end_tests(sepi).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment