![]() | ![]() | ![]() | check-link-definitions | ![]() |
| &optional silentp errorp | [Function] |
Purpose
Check for consistency among link-slot definitions of
unit classes.
Package :gbbopen
Module :gbbopen-core
Arguments and values
silentp | A generalized boolean (default is nil )
| |
errorp | A generalized boolean (default is nil )
| |
boolean | A generalized boolean |
Returns
True if all link-slot definitions are consistent; nil
otherwise.
Description
If a link inconsistency is found, details of the inconsistency
are printed to *standard-output*
If silentp is true, warning and success printing or error signaling is
supressed. If silentp is nil
and errorp is true, an error
is signaled if a link inconsistency is found.
See also
define-unit-class
check-all-instance-links
Examples
Check for consistency in link-slot definitions in all
unit classes:
> (check-link-definitions) ;; All link definitions are consistent. t >Create a link-slot inconsistency:
> (define-unit-class bad () ((mismatched-link :link (missing inverse)))) bad > (check-link-definitions) ;; Warning: The inverse of link MISMATCHED-LINK in unit-class BAD refers ;; to unit-class MISSING, which is not defined. nil >Check again, generating an error on the inconsistency:
> (check-link-definitions nil 't) Error: The inverse of link MISMATCHED-LINK in unit-class BAD refers to unit-class MISSING, which is not defined. >>Check again, silently:
> (check-link-definitions 't) nil >Define the missing unit class, but incorrectly:
> (define-unit-class missing () ((mismatched-link :link (missing bad)))) missing > (check-link-definitions) ;; Warning: The inverse of link MISMATCHED-LINK in unit-class MISSING ;; refers to link BAD which is not present in unit-class MISSING. nil >Fix the definition and check again:
> (define-unit-class missing () ((inverse :link (bad mismatched-link)))) #<standard-unit-class missing> > (check-link-definitions) ;; All link definitions are consistent. t >Check again, silently:
> (check-link-definitions 't) t >
The GBBopen Project
![]() | ![]() | ![]() | check-link-definitions | ![]() |