<commit_before>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  This file is part of Logtalk <http://logtalk.org/>  
%  Copyright (c) 1998-2014 <NAME> <<EMAIL>>
%
%  Adapter file for Quintus Prolog 3.3~3.5
%  Last updated on February 5, 2014
%
%  This program is free software: you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation, either version 3 of the License, or
%  (at your option) any later version.
%  
%  This program is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%  
%  You should have received a copy of the GNU General Public License
%  along with this program.  If not, see <http://www.gnu.org/licenses/>.
%  
%  Additional licensing terms apply per Section 7 of the GNU General
%  Public License 3. Consult the `LICENSE.txt` file for details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



:- [library(files)].
:- [library(directory)].
:- [library(date)].
:- [library(strings)].
:- [library(environ)].



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  ISO Prolog Standard predicates that we must define because they are
%  not built-in
%
%  add a clause for '$lgt_iso_predicate'/1 declaring each ISO predicate that
%  you must define; there must be at least one clause for this predicate
%  whose call should fail if you don't define any ISO predicates
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


:- op(700, xfx, \=).


% '$lgt_iso_predicate'(?callable).

'$lgt_iso_predicate'(_ \= _).
'$lgt_iso_predicate'(atom_codes(_, _)).
'$lgt_iso_predicate'(atom_concat(_, _, _)).
'$lgt_iso_predicate'(catch(_, _, _)).
'$lgt_iso_predicate'(number_codes(_, _)).
'$lgt_iso_predicate'(once(_)).
'$lgt_iso_predicate'(sub_atom(_, _, _, _, _)).
'$lgt_iso_predicate'(throw(_)).


Term1 \= Term2 :-
	\+ (Term1 = Term2).


atom_codes(Atom, Codes) :-
	atom_chars(Atom, Codes).


atom_concat(Atom1, Atom2, Atom3) :-
	nonvar(Atom1), nonvar(Atom2),
	!,
	atom_chars(Atom1, Codes1),
	atom_chars(Atom2, Codes2),
	'$lgt_append'(Codes1, Codes2, Codes3),
	atom_chars(Atom3, Codes3).

atom_concat(Atom1, Atom2, Atom3) :-
	nonvar(Atom3),
	!,
	atom_chars(Atom3, Codes3),
	'$lgt_append'(Codes1, Codes2, Codes3),
	atom_chars(Atom1, Codes1),
	atom_chars(Atom2, Codes2).


catch(Goal, Catcher, Recovery) :-
	on_exception(Catcher, Goal, Recovery).


number_codes(Number, Codes) :-
	number_chars(Number, Codes).


once(Goal) :-
	call(Goal),
	!.


sub_atom(Atom, Before, Length, After, SubAtom) :-
	substring(Atom, SubAtom, Before, Length, After).


throw(Ball) :-
	raise_exception(Ball).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  predicate properties
%
%  this predicate must return at least static, dynamic, and built_in 
%  properties for an existing predicate
%<commit_msg>Add missing definition of the standard `subsumes_term/2` predicate to the Quintus Prolog adapter file<commit_after>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  This file is part of Logtalk <http://logtalk.org/>  
%  Copyright (c) 1998-2014 <NAME> <<EMAIL>talk.org>
%
%  Adapter file for Quintus Prolog 3.3~3.5
%  Last updated on February 5, 2014
%
%  This program is free software: you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation, either version 3 of the License, or
%  (at your option) any later version.
%  
%  This program is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%  
%  You should have received a copy of the GNU General Public License
%  along with this program.  If not, see <http://www.gnu.org/licenses/>.
%  
%  Additional licensing terms apply per Section 7 of the GNU General
%  Public License 3. Consult the `LICENSE.txt` file for details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


:- [library(files)].
:- [library(directory)].
:- [library(date)].
:- [library(strings)].
:- [library(environ)].
:- [library(subsumes)].



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  ISO Prolog Standard predicates that we must define because they are
%  not built-in
%
%  add a clause for '$lgt_iso_predicate'/1 declaring each ISO predicate that
%  you must define; there must be at least one clause for this predicate
%  whose call should fail if you don't define any ISO predicates
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


:- op(700, xfx, \=).


% '$lgt_iso_predicate'(?callable).

'$lgt_iso_predicate'(_ \= _).
'$lgt_iso_predicate'(atom_codes(_, _)).
'$lgt_iso_predicate'(atom_concat(_, _, _)).
'$lgt_iso_predicate'(catch(_, _, _)).
'$lgt_iso_predicate'(number_codes(_, _)).
'$lgt_iso_predicate'(once(_)).
'$lgt_iso_predicate'(sub_atom(_, _, _, _, _)).
'$lgt_iso_predicate'(subsumes_term(_, _)).
'$lgt_iso_predicate'(throw(_)).


Term1 \= Term2 :-
	\+ (Term1 = Term2).


atom_codes(Atom, Codes) :-
	atom_chars(Atom, Codes).


atom_concat(Atom1, Atom2, Atom3) :-
	nonvar(Atom1), nonvar(Atom2),
	!,
	atom_chars(Atom1, Codes1),
	atom_chars(Atom2, Codes2),
	'$lgt_append'(Codes1, Codes2, Codes3),
	atom_chars(Atom3, Codes3).

atom_concat(Atom1, Atom2, Atom3) :-
	nonvar(Atom3),
	!,
	atom_chars(Atom3, Codes3),
	'$lgt_append'(Codes1, Codes2, Codes3),
	atom_chars(Atom1, Codes1),
	atom_chars(Atom2, Codes2).


catch(Goal, Catcher, Recovery) :-
	on_exception(Catcher, Goal, Recovery).


number_codes(Number, Codes) :-
	number_chars(Number, Codes).


once(Goal) :-
	call(Goal),
	!.


sub_atom(Atom, Before, Length, After, SubAtom) :-
	substring(Atom, SubAtom, Before, Length, After).


subsumes_term(General, Specific) :-
	subsumes(General, Specific).


throw(Ball) :-
	raise_exception(Ball).



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  predicate properties
%
%  this predicate must return at least static, dynamic, and built_in 
%  properties for an existing predicate
%
{'fraction_non_alphanumeric': 0.23355058969584108, 'fraction_numerical': 0.01722532588454376, 'mean_word_length': 5.114800759013283, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7296364', 'n_tokens_mistral': 2225, 'n_tokens_neox': 2052, 'n_words': 585}