<commit_before>/*  $Id$

    Copyright (c) 1990 <NAME>. All rights reserved.
    <EMAIL>

    Purpose: Quintus compatibility predicates
*/

:- module(quintus,
	[ unix/1
%	, file_exists/1
	, call/2
	, call/3

	, abs/2
	, sin/2
	, cos/2
	, tan/2

	, (mode)/1
	, (public)/1
	, (meta_predicate)/1
	, no_style_check/1
	]).

		/********************************
		*      SYSTEM INTERACTION       *
		*********************************/

%	unix(+Action)
%	interface to  Unix.   Currently  only  `system( Command)'  is
%	available as `Action'.

unix(system(Command)) :-
	shell(Command).
unix(access(File, 0)) :-
	access_file(File, read).

%	file_exists( +File )
%	Succeeds if `File' exists as a file or directory in the Unix file
%	system.

file_exists( File ) :-
	exists_file( File ).

		/********************************
		*          META CALLS           *
		*********************************/

:- module_transparent
	call/2,
	call/3.

%	call( +Pred,+Argument,... )
%	call `Pred', appending the additional arguments to the goal

call( Pred,A0 ) :-
	apply( Pred,[A0] ).
call( Pred,A0,A1 ) :-
	apply( Pred,[A0,A1] ).<commit_msg>* Added Quintus compatible retractall/1<commit_after>/*  $Id$

    Copyright (c) 1990 <NAME>. All rights reserved.
    <EMAIL>

    Purpose: Quintus compatibility predicates
*/

:- module(quintus,
	[ unix/1
%	, file_exists/1
	, call/2
	, call/3

	, abs/2
	, sin/2
	, cos/2
	, tan/2

	, (mode)/1
	, (public)/1
	, (meta_predicate)/1
	, no_style_check/1
	, retractall/1
	]).

		/********************************
		*      SYSTEM INTERACTION       *
		*********************************/

%	unix(+Action)
%	interface to  Unix.   Currently  only  `system( Command)'  is
%	available as `Action'.

unix(system(Command)) :-
	shell(Command).
unix(access(File, 0)) :-
	access_file(File, read).

%	file_exists( +File )
%	Succeeds if `File' exists as a file or directory in the Unix file
%	system.

file_exists( File ) :-
	exists_file( File ).

		/********************************
		*        META PREDICATES        *
		*********************************/

:- module_transparent
	call/2,
	call/3,
	retractall/1.

%	call( +Pred,+Argument,... )
%	call `Pred', appending the additional arguments to the goal

call(Pred, A0) :-
	apply(Pred, [A0]).
call( Pred,A0,A1 ) :-
	apply(Pred, [A0,A1]).


%	The quintus definition of retractall/1 retracts on the basis of
%	*head* rather then *clause* declarations.

retractall(Head) :-
	retract(Head),
	fail.
retractall(Head) :-
	retract((Head :- _)),
	fail.
retractall(_).
{'fraction_non_alphanumeric': 0.24412584627638392, 'fraction_numerical': 0.021505376344086023, 'mean_word_length': 3.2432432432432434, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7013854', 'n_tokens_mistral': 986, 'n_tokens_neox': 905, 'n_words': 210}