"moredocupdates"

This commit is contained in:
Vítor Santos Costa 2014-09-13 00:53:56 -05:00
parent 3bcf9a3f85
commit 050ce4fce6
3 changed files with 36 additions and 14 deletions

@ -1 +1 @@
Subproject commit 373c30a0e81c72a1fa3cb28b971f075aae28b443
Subproject commit c34733e2127705ec20a0661245eb2d20b1494dc2

View File

@ -74,6 +74,20 @@
@defgroup YAPStyle Checker
@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_)
Turns on style checking according to the attribute specified by _X_,
@ -174,6 +188,15 @@ style_check_('?'(Info) ) :-
style_check_([]).
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(all) :-
'$style_checker'( [ -singleton, -discontiguous, -multiple ] ).

View File

@ -155,17 +155,24 @@ defines all new or redefined predicates to be public.
'$flags'(T,Mod,F,NF).
/** @pred multifile) _P_ ) is iso
A predicate that may be defined in several files.
/** @pred multifile( _P_ ) is iso
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
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
clauses.
Multifile declarations affect [reconsult/1](@ref reconsult) and [compile/1](@ref compile):
when a multifile predicate is reconsulted, only the clauses from the
same file are removed.
Multifile declarations must be supported by reconsult/1 and
compile/1: when a multifile predicate is reconsulted,
only the clauses from the same file are removed.
Since YAP4.3.0 multifile procedures can be static or dynamic.
@ -197,14 +204,6 @@ multifile(P) :-
'$multifile'(P, M) :-
'$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) :-
var(V), !,
'$do_error'(instantiation_error,discontiguous(V)).