X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=class-support.lisp;fp=class-support.lisp;h=e7fe96025c47aa25126d121162bf286b68d4ea2c;hb=6ebaa3627ee89b8f7f429ebcd01c4dc8d9892e0b;hp=a9fae985c89b54108da0d916d6c52c6c7ea19571;hpb=612a2df000b3ff47d2454dbad0b901c1aa5558e7;p=umlisp.git diff --git a/class-support.lisp b/class-support.lisp index a9fae98..e7fe960 100644 --- a/class-support.lisp +++ b/class-support.lisp @@ -87,10 +87,14 @@ (defgeneric fmt-aui (aui)) (when *has-fixnum-class* (defmethod fmt-aui ((aui fixnum)) - (prefixed-fixnum-string aui #\A 7))) + (if (>= aui 10000000) + (prefixed-fixnum-string aui #\A 8) + (prefixed-fixnum-string aui #\A 7)))) (defmethod fmt-aui ((aui integer)) - (prefixed-integer-string aui #\A 7)) + (if (>= aui 10000000) + (prefixed-integer-string aui #\A 8) + (prefixed-integer-string aui #\A 7))) (defmethod fmt-aui ((aui string)) (if (eql (aref aui 0) #\A) @@ -218,7 +222,7 @@ (dolist (term (s#term ucon) (nreverse res)) (dolist (str (s#str term)) (push str res))))) - + (defmethod pfstr ((uterm uterm)) "Return the preferred string for a uterm" @@ -318,7 +322,7 @@ ((char-equal #\O c) "Other")))) - + (defun ucon-parents (con &optional sab) (ucon-ancestors con sab t)) @@ -327,7 +331,7 @@ (let* ((parent-rels (filter-urels-by-rel (s#rel ucon) "par")) (anc nil)) (when sab - (setq parent-rels (delete-if-not + (setq parent-rels (delete-if-not (lambda (rel) (string-equal sab (sab rel))) parent-rels))) (dolist (rel parent-rels (nreverse anc)) @@ -342,12 +346,12 @@ (defmethod cxt-ancestors ((con ucon)) (loop for term in (s#term con) append (cxt-ancestors term))) - + (defmethod cxt-ancestors ((term uterm)) (loop for str in (s#str term) append (cxt-ancestors str))) - + (defmethod cxt-ancestors ((str ustr)) "Return the ancestory contexts of a ustr" (let* ((anc (remove-if-not @@ -364,7 +368,7 @@ (sort anc-this-cxn (lambda (a b) (< (rank a) (rank b)))) anc-lists))))) - + #+scl (dolist (c '(urank udef usat uso ucxt ustr ulo uterm usty urel ucoc uatx ucon uxw uxnw uxns lexterm labr lagr lcmp lmod lnom lprn lprp lspl ltrm ltyp lwd sdef sstr sstre1 sstre2 usrl)) (let ((cl (find-class c)))