"moredocupdates"
This commit is contained in:
parent
3bcf9a3f85
commit
050ce4fce6
@ -1 +1 @@
|
|||||||
Subproject commit 373c30a0e81c72a1fa3cb28b971f075aae28b443
|
Subproject commit c34733e2127705ec20a0661245eb2d20b1494dc2
|
@ -74,6 +74,20 @@
|
|||||||
@defgroup YAPStyle Checker
|
@defgroup YAPStyle Checker
|
||||||
@ingroup YAPCompilerSettings
|
@ingroup YAPCompilerSettings
|
||||||
|
|
||||||
|
YAP implements a style-checker thay currently verifies whether:
|
||||||
|
|
||||||
|
1 named variables occur once in a clause.
|
||||||
|
|
||||||
|
2 clauses from dofferent predicates are mixed together.
|
||||||
|
|
||||||
|
3 clauses for the same predicate occur in different files.
|
||||||
|
|
||||||
|
One can declare a predicate to be discontiguous (see the
|
||||||
|
discontiguous/1 declaration) and/or multifile/1.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
@pred style_check(+ _X_)
|
@pred style_check(+ _X_)
|
||||||
|
|
||||||
Turns on style checking according to the attribute specified by _X_,
|
Turns on style checking according to the attribute specified by _X_,
|
||||||
@ -174,6 +188,15 @@ style_check_('?'(Info) ) :-
|
|||||||
style_check_([]).
|
style_check_([]).
|
||||||
style_check_([H|T]) :- style_check(H), style_check(T).
|
style_check_([H|T]) :- style_check(H), style_check(T).
|
||||||
|
|
||||||
|
/** @pred no_style_check(+ _X_)
|
||||||
|
|
||||||
|
Turns off style checking according to the attribute specified by
|
||||||
|
_X_, which have the same meaning as in style_check/1.
|
||||||
|
|
||||||
|
The no_style_check/1 built-in is now deprecated. Please use
|
||||||
|
`set_prolog_flag/1` instead.
|
||||||
|
|
||||||
|
**/
|
||||||
no_style_check(V) :- var(V), !, fail.
|
no_style_check(V) :- var(V), !, fail.
|
||||||
no_style_check(all) :-
|
no_style_check(all) :-
|
||||||
'$style_checker'( [ -singleton, -discontiguous, -multiple ] ).
|
'$style_checker'( [ -singleton, -discontiguous, -multiple ] ).
|
||||||
|
@ -155,17 +155,24 @@ defines all new or redefined predicates to be public.
|
|||||||
'$flags'(T,Mod,F,NF).
|
'$flags'(T,Mod,F,NF).
|
||||||
|
|
||||||
|
|
||||||
/** @pred multifile) _P_ ) is iso
|
/** @pred multifile( _P_ ) is iso
|
||||||
A predicate that may be defined in several files.
|
|
||||||
|
Declares that a predicate or several predicates may be defined
|
||||||
|
throughout several files. _P_ is a collection of one or more predicate
|
||||||
|
indicators:
|
||||||
|
|
||||||
|
~~~~~~~
|
||||||
|
:- multifile user:portray_message/2, multifile user:message_hook/3.
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
Instructs the compiler about the declaration of a predicate _P_ in
|
Instructs the compiler about the declaration of a predicate _P_ in
|
||||||
more than one file. It must appear in the first of the loaded files
|
more than one file. It must appear in the first of the loaded files
|
||||||
where the predicate is declared, and before declaration of any of its
|
where the predicate is declared, and before declaration of any of its
|
||||||
clauses.
|
clauses.
|
||||||
|
|
||||||
Multifile declarations affect [reconsult/1](@ref reconsult) and [compile/1](@ref compile):
|
Multifile declarations must be supported by reconsult/1 and
|
||||||
when a multifile predicate is reconsulted, only the clauses from the
|
compile/1: when a multifile predicate is reconsulted,
|
||||||
same file are removed.
|
only the clauses from the same file are removed.
|
||||||
|
|
||||||
Since YAP4.3.0 multifile procedures can be static or dynamic.
|
Since YAP4.3.0 multifile procedures can be static or dynamic.
|
||||||
|
|
||||||
@ -197,14 +204,6 @@ multifile(P) :-
|
|||||||
'$multifile'(P, M) :-
|
'$multifile'(P, M) :-
|
||||||
'$do_error'(type_error(predicate_indicator,P),multifile(M:P)).
|
'$do_error'(type_error(predicate_indicator,P),multifile(M:P)).
|
||||||
|
|
||||||
/** @pred no_style_check(+ _X_)
|
|
||||||
Turns off style checking according to the attribute specified by
|
|
||||||
_X_, which has the same meaning as in style_check/1.
|
|
||||||
|
|
||||||
The no_style_check/1 built-in is now deprecated. Please use
|
|
||||||
`set_prolog_flag/1` instead.
|
|
||||||
|
|
||||||
**/
|
|
||||||
discontiguous(V) :-
|
discontiguous(V) :-
|
||||||
var(V), !,
|
var(V), !,
|
||||||
'$do_error'(instantiation_error,discontiguous(V)).
|
'$do_error'(instantiation_error,discontiguous(V)).
|
||||||
|
Reference in New Issue
Block a user