Commit 04e4e8dc authored by Nick Matvyeyev's avatar Nick Matvyeyev

Устраненны предупреждения при компилляции

parent 4a6b2c7e
Pipeline #351 failed with stages
# ToDo
1. Определить функцию package-class-slot-graph (package class)
4. Определить функцию package-function-use-graph (package),
которая-бы строила граф использования во всех функциях пакета
глобальных параметров.
3. Определить функцию package-class-slot-graph (package class),
которая-бы строила граф слотов класса.
2. Определить правильный набор экспортируемых функций.
+ 1. Справиться с предупреждениями при компиляции.
;;;; cl-user-import-symbols.lisp
(in-package :cl-user)
(in-package :mnas-package)
(use-package :mnas-package)
(defun use-mnas-package ()
(use-package (find-package :mnas-package) (find-package :cl-user)))
(defun unuse-mnas-package ()
(unuse-package (find-package :mnas-package) (find-package :cl-user)))
......@@ -2,22 +2,18 @@
(in-package #:mnas-package)
(export 'demo-1)
(defun demo-1 ()
(defun mnas-package-demo-1 ()
(require :mnas-string)
(package-symbols-by-category :mnas-package :internal nil))
(export 'demo-2)
(defun demo-2 ()
(defun mnas-package-demo-2 ()
(require :mnas-string)
(package-symbols-by-category :mnas-package))
(export 'demo-3)
(defun demo-3 ()
(defun mnas-package-demo-3 ()
(make-call-praph :mnas-package))
(export 'demo-10)
(defun demo-10 ()
(defun mnas-package-demo-10 ()
(require :mnas-string)
(make-call-praph :mnas-string))
......@@ -36,10 +32,8 @@
(defclass c1 (a3 b3) ()))
(export 'demo-11)
(defun demo-11 ()
(make-call-praph :mnas-package)
(make-class-graph :mnas-package))
(defun mnas-package-demo-11 ()
(package-class-graph :mnas-package))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......@@ -47,8 +41,8 @@
(format t "~%~%~%")
(format t "mnas-package DEMOS~%")
(format t "==================~%")
(format t "(mnas-package:demo-1)~%")
(format t "(mnas-package:demo-2)~%")
(format t "(mnas-package:demo-3)~%")
(format t "(mnas-package:demo-10)~%")
(format t "(mnas-package:demo-11)"))
(format t "(mnas-package:mnas-package-demo-1)~%")
(format t "(mnas-package:mnas-package-demo-2)~%")
(format t "(mnas-package:mnas-package-demo-3)~%")
(format t "(mnas-package:mnas-package-demo-10)~%")
(format t "(mnas-package:mnas-package-demo-11)"))
......@@ -6,9 +6,10 @@
"Выполнят поиск всех символов, определенных пакетом package-name
Примеры использования:
=====================
(package-symbols 'mnas-call-graph)
(package-symbols :mnas-call-graph)
(package-symbols \"MNAS-CALL-GRAPH\")"
(package-symbols 'mnas-package)
(package-symbols :mnas-package)
(package-symbols (find-package :mnas-package))
(package-symbols \"MNAS-PACKAGE\")"
(declare ((or package string symbol) package-name))
(cond
(package (do-symbols (s package ) (push s lst)) lst)
......@@ -30,9 +31,9 @@
- inherited nil - заимствованные символы.
Примеры использования:
=====================
(package-symbols-by-category 'mnas-call-graph :internal nil) ;; отбор только внешних символов;
(package-symbols-by-category :mnas-call-graph) ;; отбор внешних и внутренних символов;
(package-symbols-by-category \"MNAS-CALL-GRAPH\"
(package-symbols-by-category 'mnas-package :internal nil) ;; отбор только внешних символов;
(package-symbols-by-category :mnas-package) ;; отбор внешних и внутренних символов;
(package-symbols-by-category \"MNAS-PACKAGE\"
:internal nil
:inherited t) ;; отбор только внешних и заимствованных символов;
"
......@@ -133,7 +134,11 @@
(rez nil)
(class nil)
(package (find-package package-name)))
"Возвращает список классов пакета"
"Возвращает список классов пакета.
Пример использования:
(mnas-package::package-classes :mnas-package)
(mnas-package::package-classes (find-package \"MNAS-PACKAGE\"))
(mnas-package::package-classes (find-package :mnas-package))"
(declare ((or package string symbol) package-name))
(mapc
#'(lambda (el)
......@@ -174,7 +179,9 @@
(package-name
&key
(graphviz-prg :filter-dot))
"Выводит визуальное представление иерархии классов (графа наследования)"
"Выводит визуальное представление иерархии классов (графа наследования)
Пример использования:
(mnas-package:mnas-package-demo-11)"
(when (symbolp package-name) (require package-name))
(when (stringp package-name) (require package-name))
(mnas-graph:view-graph
......@@ -190,14 +197,14 @@
(class-undirect-subclasses (find-class 'number))
"
(let ((rez-classes nil)
(*l-not-obr* (list class-01)))
(l-not-obr (list class-01)))
(flet
((bar (class)
(format t "~S~%" (class-name class))
(setf *l-not-obr* (append *l-not-obr* (sb-mop:class-direct-subclasses class)))))
(setf l-not-obr (append l-not-obr (sb-mop:class-direct-subclasses class)))))
(do ((class nil))
((null *l-not-obr*) rez-classes)
(setf class (pop *l-not-obr*))
((null l-not-obr) rez-classes)
(setf class (pop l-not-obr))
(push class rez-classes)
(bar class)))))
......
;;;; package.lisp
(defpackage #:mnas-package)
(defpackage #:mnas-package
(:use #:cl)
(:export ;read-file ;defun-code ;defun-name ;defmethod-code ;defmethod-name ;def-name
package-symbols
package-symbols-by-category
package-function-symbols
defu-defm-name
who-calls
who-calls-lst)
(:export make-call-praph )
(:export make-class-graph package-classes package-class-graph)
(:export package-call-graph package-class-graph)
(:export demo-1 demo-2 demo-3 demo-10 demo-11))
;;;; mnas-package.lisp
(:export mnas-package::package-symbols
mnas-package::package-symbols-by-category
mnas-package::package-function-symbols
mnas-package::defu-defm-name
mnas-package::who-calls
mnas-package::who-calls-lst
mnas-package::make-call-praph
mnas-package::make-class-graph
mnas-package::package-classes
mnas-package::package-call-graph
mnas-package::package-class-graph
)
;;;; demos.lisp
(:export mnas-package::mnas-package-demo-1
mnas-package::mnas-package-demo-2
mnas-package::mnas-package-demo-3
mnas-package::mnas-package-demo-10
mnas-package::mnas-package-demo-11
)
;;;; cl-user-import-symbols.lisp
(:export mnas-package::use-mnas-package
mnas-package::unuse-mnas-package
))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment