<commit_before>
:- if((current_logtalk_flag(prolog_dialect, swi); current_logtalk_flag(prolog_dialect, yap))).

	:- use_module(library(clpr), []).

	:- object(pta).

		:- info([
			version is 0.1,
			author is '<NAME> and <NAME>. Adapted to Logtalk by <NAME>.',
			date is 2010/07/23,
			comment is 'Pushdown timed automaton example.']).

		:- public(driver/6).
		:- coinductive(driver/6).

		driver([X| R], Si, C1, Tr, T, [(X, T)| S]) :-
			trans(Si, X, Sj, T, Tr, To, C1, C2),
			clpr:{Ta > T},
			driver(R, Sj, C2, To, Ta, S).

		trans(s0, a, s1, T, _Tr, To, _, [1]) :- clpr:{To = T}.
		trans(s1, a, s1, _T, Tr, To, C, [1| C]) :- clpr:{To = Tr}.
		trans(s1, b, s2, T, Tr, To, [1| C], C) :- clpr:{T - Tr < 5, To = Tr}.
		trans(s2, b, s2, _T, Tr, To, [1| C], C) :- clpr:{To = Tr}.
		trans(s2, b, s0, T, Tr, To, [1| C], C) :- clpr:{T - Tr < 20, To = Tr}.

	:- end_object.

:- endif.<commit_msg>Added an ECLiPSe version of the "pta" coinduction example.<commit_after>
:- if(current_logtalk_flag(prolog_dialect, eclipse)).

	:- lib(ic).

	:- object(pta).

		:- info([
			version is 0.1,
			author is '<NAME> and <NAME>. Adapted to Logtalk by <NAME>a.',
			date is 2010/07/23,
			comment is 'Pushdown timed automaton example.']).

		:- public(driver/6).
		:- coinductive(driver/6).

		driver([X| R], Si, C1, Tr, T, [(X, T)| S]) :-
			trans(Si, X, Sj, T, Tr, To, C1, C2),
			ic:(Ta > T),
			driver(R, Sj, C2, To, Ta, S).

		trans(s0, a, s1,  T, _Tr, To, _,      [1]) :-    ic:(To =:= T).
		trans(s1, a, s1, _T,  Tr, To, C,      [1| C]) :- ic:(To =:= Tr).
		trans(s1, b, s2,  T,  Tr, To, [1| C], C) :-      ic:(T - Tr < 5), ic:(To =:= Tr).
		trans(s2, b, s2, _T,  Tr, To, [1| C], C) :-      ic:(To =:= Tr).
		trans(s2, b, s0,  T,  Tr, To, [1| C], C) :-      ic:(T - Tr < 20), ic:(To =:= Tr).

	:- end_object.

:- elif((current_logtalk_flag(prolog_dialect, swi); current_logtalk_flag(prolog_dialect, yap))).

	:- use_module(library(clpr), []).

	:- object(pta).

		:- info([
			version is 0.1,
			author is '<NAME> and <NAME>. Adapted to Logtalk by <NAME>.',
			date is 2010/07/23,
			comment is 'Pushdown timed automaton example.']).

		:- public(driver/6).
		:- coinductive(driver/6).

		driver([X| R], Si, C1, Tr, T, [(X, T)| S]) :-
			trans(Si, X, Sj, T, Tr, To, C1, C2),
			clpr:{Ta > T},
			driver(R, Sj, C2, To, Ta, S).

		trans(s0, a, s1,  T, _Tr, To, _,      [1]) :-    clpr:{To = T}.
		trans(s1, a, s1, _T,  Tr, To, C,      [1| C]) :- clpr:{To = Tr}.
		trans(s1, b, s2,  T,  Tr, To, [1| C], C) :-      clpr:{T - Tr < 5, To = Tr}.
		trans(s2, b, s2, _T,  Tr, To, [1| C], C) :-      clpr:{To = Tr}.
		trans(s2, b, s0,  T,  Tr, To, [1| C], C) :-      clpr:{T - Tr < 20, To = Tr}.

	:- end_object.

:- endif.
{'fraction_non_alphanumeric': 0.24113737075332348, 'fraction_numerical': 0.03766617429837518, 'mean_word_length': 2.5365535248041775, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5803769', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1230, 'n_words': 357}