<commit_before>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  
%  This file is part of Logtalk <http://logtalk.org/>    
%  
%  Logtalk is free software. You can redistribute it and/or modify it under
%  the terms of the FSF GNU General Public License 3  (plus some additional
%  terms per section 7).        Consult the `LICENSE.txt` file for details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


:- object(tests,
	extends(lgtunit)).

	:- info([
		version is 1.21,
		author is '<NAME> and <NAME>',
		date is 2013/04/27,
		comment is 'Unit tests for the "tabling" example.'
	]).
	
	test(tabling_1) :-
		setof(Y, paths::path(1, Y), Ys),
		Ys = [2, 3, 4, 5].
	
	test(tabling_2) :-
		fibonacci::fib(30, F),
		F == 1346269.

	unit(fibonacci).
	unit(paths).

	:- if(current_logtalk_flag(prolog_dialect, yap)).

	unit(mdt_paths_first).
	unit(mdt_paths_min).
	unit(mdt_paths_min_all).

	test(tabling_3) :-
		setof((Z, N), mdt_paths_first::path(a, Z, N), L),
		L == [(a, 2), (b, 1)].

	test(tabling_4) :-
		setof((Z, C), mdt_paths_min::path(a, Z, C), L),
		L == [(b, 1), (c, 2), (d, 3)].

	test(tabling_5) :-
		setof((Z, C, N), mdt_paths_min_all::path(a, Z, C, N), L),
		L == [(b, 2, 1), (b, 2, 2), (c, 1, 1)].

	:- endif.

:- end_object.<commit_msg>Fix a discontiguous predicate warning when running the `tabling` example unit tests using YAP as the back-end Prolog compiler<commit_after>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  
%  This file is part of Logtalk <http://logtalk.org/>    
%  
%  Logtalk is free software. You can redistribute it and/or modify it under
%  the terms of the FSF GNU General Public License 3  (plus some additional
%  terms per section 7).        Consult the `LICENSE.txt` file for details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


:- object(tests,
	extends(lgtunit)).

	:- info([
		version is 1.22,
		author is '<NAME> and <NAME>',
		date is 2013/08/10,
		comment is 'Unit tests for the "tabling" example.'
	]).

	unit(fibonacci).
	unit(paths).

	:- if(current_logtalk_flag(prolog_dialect, yap)).
	unit(mdt_paths_first).
	unit(mdt_paths_min).
	unit(mdt_paths_min_all).
	:- endif.

	test(tabling_1) :-
		setof(Y, paths::path(1, Y), Ys),
		Ys = [2, 3, 4, 5].
	
	test(tabling_2) :-
		fibonacci::fib(30, F),
		F == 1346269.

	:- if(current_logtalk_flag(prolog_dialect, yap)).

	test(tabling_3) :-
		setof((Z, N), mdt_paths_first::path(a, Z, N), L),
		L == [(a, 2), (b, 1)].

	test(tabling_4) :-
		setof((Z, C), mdt_paths_min::path(a, Z, C), L),
		L == [(b, 1), (c, 2), (d, 3)].

	test(tabling_5) :-
		setof((Z, C, N), mdt_paths_min_all::path(a, Z, C, N), L),
		L == [(b, 2, 1), (b, 2, 2), (c, 1, 1)].

	:- endif.

:- end_object.
{'fraction_non_alphanumeric': 0.27302042278753136, 'fraction_numerical': 0.03081332855607309, 'mean_word_length': 3.8472222222222223, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2197263', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1061, 'n_words': 288}