<commit_before>
:- object(help).

	:- info([
		version is 0.5,
		author is '<NAME>',
		date is 2010/11/24,
		comment is 'Command-line help for Logtalk built-in control constructs, predicates, non-terminals, and methods.']).

	:- initialization((nl, write('For help on Logtalk, type help::help.'), nl)).

	:- public(help/0).
	:- mode(help, one).
	:- info(help/0, [
		comment is 'Prints instructions on how to use help.']).

	help :-
		write('On-line help is available for Logtalk built-in control constructs,'), nl,
		write('built-in directives, built-in predicates, built-in non-terminals,'), nl,
		write('built-in methods, and the standard library:'), nl, nl,
		write('  Type help::Functor/Arity.'), nl,
		write('  Or   help::Functor//Arity. '), nl,
		write('  Or   help::library.'), nl,
		write('  Or   help::library(Entity).'), nl, nl,
		write('The manual web page for the selected built-in feature will open in'), nl,
		write('your default web browser. To consult the Logtalk User and Reference'), nl,
		write('manuals:'), nl, nl,
		write('  Type help::manuals.'), nl, nl.

	:- public(('/')/2).
	:- mode('/'(+atom, +integer), zero_or_one).
	:- info(('/')/2, [
		comment is 'Provides help on the Functor/Arity built-in control construct, predicate, or method.',
		argnames is ['Functor', 'Arity']]).

	Functor/Arity :-
		forall(
			(	built_in_directive(Functor, Arity, Path, File)
			;	built_in_method(Functor, Arity, Path, File)
			;	built_in_predicate(Functor, Arity, Path, File)
			;	control(Functor, Arity, Path, File)
			),
			open(Path, File)
		).

	:- public(('//')/2).
	:- mode('//'(+atom, +integer), zero_or_one).
	:- info(('//')/2, [
		comment is 'Provides help on the Functor/Arity built-in non-terminal.',
		argnames is ['Functor', 'Arity']]).

	NonTerminalFunctor//Arity :-
		forall(
			built_in_non_terminal(NonTerminalFunctor, Arity, Path, File),
			open(Path, File)
		).

	built_in_directive(encoding, 1, '/manuals/refman/directives/', 'encoding1.html').
	built_in_directive(initialization, 1, '/manuals/refman/directives/', 'initialization1.html').
	built_in_directive(op, 3, '/manuals/refman/directives/', 'op3.html').
	built_in_directive(set_logtalk_flag, 2, '/manuals/refman/directives/', 'set_logtalk_flag2.html').

	built_in_directive(if, 1, '/manuals/refman/directives/', 'if1.html').
	built_in_directive(elif, 1, '/manuals/refman/directives/', 'elif1.html').
	built_in_directive(else, 0, '/manuals/refman/directives/', 'else0.html').
	built_in_directive(endif, 0, '/manuals/refman/directives/', 'endif0.html').

	built_in_directive(calls, 1, '/manuals/refman/directives/', 'calls1.html').
	built_in_directive(category, N, '/manuals/refman/directives/', 'category1.html') :-
		N >= 1, N =< 3.
	built_in_directive(dynamic, 0, '/manuals/refman/directives/', 'dynamic0.html').
	built_in_directive(end_category, 0, '/manuals/refman/directives/', 'end_category0.html').
	built_in_directive(end_object, 0, '/manuals/refman/directives/', 'end_object0.html').
	built_in_directive(end_protocol, 0, '/manuals/refman/directives/', 'end_protocol0.html').
	built_in_directive(info, 1, '/manuals/refman/directives/', 'info1.html').
	built_in_directive(initialization, 1, '/manuals/refman/directives/', 'initialization1.html').
	built_in_directive(object, N, '/manuals/refman/directives/', 'object1.html') :-
		N >= 1, N =< 5.
	built_in_directive(protocol, N, '/manuals/refman/directives/', 'protocol1.html') :-
		N >= 1, N =< 2.
	built_in_directive(synchronized, 0, '/manuals/refman/directives/', 'synchronized0.html').
	built_in_directive(threaded, 0, '/manuals/refman/directives/', 'threaded0.html').
	built_in_directive(uses, 1, '/manuals/refman/directives/', 'uses1.html').

	built_in_directive(alias, 3, '/manuals/refman/directives/', 'alias3.html').
	built_in_directive(coinductive, 1, '/manuals/refman/directives/', 'coinductive1.html').
	built_in_directive(discontiguous, 1, '/manuals/refman/directives/', 'discontiguous1.html').
	built_in_directive(dynamic, 1, '/manuals/refman/directives/', 'dynamic1.html').
	built_in_directive(info, 2, '/manuals/refman/directives/', 'info2.html').
	built_in_directive(meta_predicate, 1, '/manuals/refman/directives/', 'meta_predicate1.html').
	built_in_directive(mode, 2, '/manuals/refman/directives/', 'mode2.html').
	built_in_directive(multifile, 1, '/manuals/refman/directives/', 'multifile1.html').
	built_in_directive(op, 3, '/manuals/refman/directives/', 'op3.html').
	built_in_directive(private, 1, '/manuals/refman/directives/', 'private1.html').
	built_in_directive(protected, 1, '/manuals/refman/directives/', 'protected1.html').
	built_in_directive(public, 1, '/manuals/refman/directives/', 'public1.html').
	built_in_directive(synchronized, 1, '/manuals/refman/directives/', 'synchronized1.html').
	built_in_directive(uses, 2, '/manuals/refman/directives/', 'uses2.html').

	built_in_predicate(current_category, 1, '/manuals/refman/builtins/', 'current_category1.html').
	built_in_predicate(current_object, 1, '/manuals/refman/builtins/', 'current_object1.html').
	built_in_predicate(current_protocol, 1, '/manuals/refman/builtins/', 'current_protocol1.html').

	built_in_predicate(category_property, 2, '/manuals/refman/builtins/', 'category_property2.html').
	built_in_predicate(object_property, 2, '/manuals/refman/builtins/', 'object_property2.html').
	built_in_predicate(protocol_property, 2, '/manuals/refman/builtins/', 'protocol_property2.html').

	built_in_predicate(create_category, 4, '/manuals/refman/builtins/', 'create_category4.html').
	built_in_predicate(create_object, 4, '/manuals/refman/builtins/', 'create_object4.html').
	built_in_predicate(create_protocol, 3, '/manuals/refman/builtins/', 'create_protocol3.html').

	built_in_predicate(abolish_category, 1, '/manuals/refman/builtins/', 'abolish_category1.html').<commit_msg>Updated the "help" example in order to support the new annotation/1 predicate directive.<commit_after>
:- object(help).

	:- info([
		version is 0.5,
		author is '<NAME>',
		date is 2010/11/24,
		comment is 'Command-line help for Logtalk built-in control constructs, predicates, non-terminals, and methods.']).

	:- initialization((nl, write('For help on Logtalk, type help::help.'), nl)).

	:- public(help/0).
	:- mode(help, one).
	:- info(help/0, [
		comment is 'Prints instructions on how to use help.']).

	help :-
		write('On-line help is available for Logtalk built-in control constructs,'), nl,
		write('built-in directives, built-in predicates, built-in non-terminals,'), nl,
		write('built-in methods, and the standard library:'), nl, nl,
		write('  Type help::Functor/Arity.'), nl,
		write('  Or   help::Functor//Arity. '), nl,
		write('  Or   help::library.'), nl,
		write('  Or   help::library(Entity).'), nl, nl,
		write('The manual web page for the selected built-in feature will open in'), nl,
		write('your default web browser. To consult the Logtalk User and Reference'), nl,
		write('manuals:'), nl, nl,
		write('  Type help::manuals.'), nl, nl.

	:- public(('/')/2).
	:- mode('/'(+atom, +integer), zero_or_one).
	:- info(('/')/2, [
		comment is 'Provides help on the Functor/Arity built-in control construct, directive, predicate, or method.',
		argnames is ['Functor', 'Arity']]).

	Functor/Arity :-
		forall(
			(	built_in_directive(Functor, Arity, Path, File)
			;	built_in_method(Functor, Arity, Path, File)
			;	built_in_predicate(Functor, Arity, Path, File)
			;	control(Functor, Arity, Path, File)
			),
			open(Path, File)
		).

	:- public(('//')/2).
	:- mode('//'(+atom, +integer), zero_or_one).
	:- info(('//')/2, [
		comment is 'Provides help on the Functor//Arity built-in non-terminal.',
		argnames is ['Functor', 'Arity']]).

	NonTerminalFunctor//Arity :-
		forall(
			built_in_non_terminal(NonTerminalFunctor, Arity, Path, File),
			open(Path, File)
		).

	built_in_directive(encoding, 1, '/manuals/refman/directives/', 'encoding1.html').
	built_in_directive(initialization, 1, '/manuals/refman/directives/', 'initialization1.html').
	built_in_directive(op, 3, '/manuals/refman/directives/', 'op3.html').
	built_in_directive(set_logtalk_flag, 2, '/manuals/refman/directives/', 'set_logtalk_flag2.html').

	built_in_directive(if, 1, '/manuals/refman/directives/', 'if1.html').
	built_in_directive(elif, 1, '/manuals/refman/directives/', 'elif1.html').
	built_in_directive(else, 0, '/manuals/refman/directives/', 'else0.html').
	built_in_directive(endif, 0, '/manuals/refman/directives/', 'endif0.html').

	built_in_directive(calls, 1, '/manuals/refman/directives/', 'calls1.html').
	built_in_directive(category, N, '/manuals/refman/directives/', 'category1.html') :-
		N >= 1, N =< 3.
	built_in_directive(dynamic, 0, '/manuals/refman/directives/', 'dynamic0.html').
	built_in_directive(end_category, 0, '/manuals/refman/directives/', 'end_category0.html').
	built_in_directive(end_object, 0, '/manuals/refman/directives/', 'end_object0.html').
	built_in_directive(end_protocol, 0, '/manuals/refman/directives/', 'end_protocol0.html').
	built_in_directive(info, 1, '/manuals/refman/directives/', 'info1.html').
	built_in_directive(initialization, 1, '/manuals/refman/directives/', 'initialization1.html').
	built_in_directive(object, N, '/manuals/refman/directives/', 'object1.html') :-
		N >= 1, N =< 5.
	built_in_directive(protocol, N, '/manuals/refman/directives/', 'protocol1.html') :-
		N >= 1, N =< 2.
	built_in_directive(synchronized, 0, '/manuals/refman/directives/', 'synchronized0.html').
	built_in_directive(threaded, 0, '/manuals/refman/directives/', 'threaded0.html').
	built_in_directive(uses, 1, '/manuals/refman/directives/', 'uses1.html').

	built_in_directive(alias, 3, '/manuals/refman/directives/', 'alias3.html').
	built_in_directive(annotation, 1, '/manuals/refman/directives/', 'annotation1.html').
	built_in_directive(coinductive, 1, '/manuals/refman/directives/', 'coinductive1.html').
	built_in_directive(discontiguous, 1, '/manuals/refman/directives/', 'discontiguous1.html').
	built_in_directive(dynamic, 1, '/manuals/refman/directives/', 'dynamic1.html').
	built_in_directive(info, 2, '/manuals/refman/directives/', 'info2.html').
	built_in_directive(meta_predicate, 1, '/manuals/refman/directives/', 'meta_predicate1.html').
	built_in_directive(mode, 2, '/manuals/refman/directives/', 'mode2.html').
	built_in_directive(multifile, 1, '/manuals/refman/directives/', 'multifile1.html').
	built_in_directive(op, 3, '/manuals/refman/directives/', 'op3.html').
	built_in_directive(private, 1, '/manuals/refman/directives/', 'private1.html').
	built_in_directive(protected, 1, '/manuals/refman/directives/', 'protected1.html').
	built_in_directive(public, 1, '/manuals/refman/directives/', 'public1.html').
	built_in_directive(synchronized, 1, '/manuals/refman/directives/', 'synchronized1.html').
	built_in_directive(uses, 2, '/manuals/refman/directives/', 'uses2.html').

	built_in_predicate(current_category, 1, '/manuals/refman/builtins/', 'current_category1.html').
	built_in_predicate(current_object, 1, '/manuals/refman/builtins/', 'current_object1.html').
	built_in_predicate(current_protocol, 1, '/manuals/refman/builtins/', 'current_protocol1.html').

	built_in_predicate(category_property, 2, '/manuals/refman/builtins/', 'category_property2.html').
	built_in_predicate(object_property, 2, '/manuals/refman/builtins/', 'object_property2.html').
	built_in_predicate(protocol_property, 2, '/manuals/refman/builtins/', 'protocol_property2.html').

	built_in_predicate(create_category, 4, '/manuals/refman/builtins/', 'create_category4.html').
	built_in_predicate(create_object, 4, '/manuals/refman/builtins/', 'create_object4.html').
	built_in_predicate(create_protocol, 3, '/manuals/refman/builtins/', 'create_protocol3.html').

	built_in_predicate(abolish_category, 1, '/manuals/refman/builtins/', 'abolish_category1.html').
{'fraction_non_alphanumeric': 0.17796035913942063, 'fraction_numerical': 0.0187192952735897, 'mean_word_length': 5.227320675105485, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1741471', 'n_tokens_mistral': 4598, 'n_tokens_neox': 4374, 'n_words': 780}