From aeade16272b79115d3f307906c7a3e9597137e97 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 19 Apr 2004 16:38:09 +0000 Subject: [PATCH] r9104: update dates/headers --- class-support.lisp | 11 +++++------ classes.lisp | 10 +++++----- composite.lisp | 11 +++++------ create-sql.lisp | 10 +++++----- data-structures.lisp | 8 ++++---- package.lisp | 10 +++++----- parse-2002.lisp | 15 ++++++--------- parse-common.lisp | 18 ++++++++---------- parse-macros.lisp | 10 +++++----- run-tests.lisp | 21 ++++++++++++++++++++- sql-classes.lisp | 8 ++++---- sql.lisp | 10 +++++----- utils.lisp | 27 +++++++++++++++++---------- 13 files changed, 94 insertions(+), 75 deletions(-) diff --git a/class-support.lisp b/class-support.lisp index 8cec597..89dbd6e 100644 --- a/class-support.lisp +++ b/class-support.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: classes-support.lisp -;;;; Purpose: Support for UMLisp classes -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: classes-support.lisp +;;;; Purpose: Support for UMLisp classes +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -18,7 +18,6 @@ (in-package #:umlisp) - ;;; Formatting routines (defgeneric fmt-cui (c)) diff --git a/classes.lisp b/classes.lisp index e066b36..7c3b9a8 100644 --- a/classes.lisp +++ b/classes.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: classes.lisp -;;;; Purpose: Class defintions for UMLisp -;;;; Programmer: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: classes.lisp +;;;; Purpose: Class defintions for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. diff --git a/composite.lisp b/composite.lisp index 16d8cda..ebda355 100644 --- a/composite.lisp +++ b/composite.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: composite.lisp -;;;; Purpose: Composite Classes for UMLisp -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: composite.lisp +;;;; Purpose: Composite Classes for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -18,7 +18,6 @@ (in-package #:umlisp) - ;;; Semantic type constants (defun find-tui-word (words) diff --git a/create-sql.lisp b/create-sql.lisp index ec162b8..e212536 100644 --- a/create-sql.lisp +++ b/create-sql.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: sql-create -;;;; Purpose: Create SQL database for UMLisp -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: sql-create +;;;; Purpose: Create SQL database for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. diff --git a/data-structures.lisp b/data-structures.lisp index b5c3576..7652fc8 100644 --- a/data-structures.lisp +++ b/data-structures.lisp @@ -2,10 +2,10 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: data-structures.lisp -;;;; Purpose: Basic data objects for UMLisp -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: data-structures.lisp +;;;; Purpose: Basic data objects for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; diff --git a/package.lisp b/package.lisp index 47c249a..dedcb07 100644 --- a/package.lisp +++ b/package.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: package.lisp -;;;; Purpose: Package definition for UMLisp -;;;; Programmer: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: package.lisp +;;;; Purpose: Package definition for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. diff --git a/parse-2002.lisp b/parse-2002.lisp index ae126a0..aa9c46a 100644 --- a/parse-2002.lisp +++ b/parse-2002.lisp @@ -2,16 +2,16 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: parse-2002.lisp -;;;; Purpose: Parsing and SQL insertion routines for UMLisp which may -;;;; change from year to year -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: parse-2002.lisp +;;;; Purpose: Parsing and SQL insertion routines for UMLisp which may +;;;; change from year to year +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -19,9 +19,6 @@ (in-package #:umlisp) -(eval-when (:compile-toplevel) - (declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))) - ;;; Pre-read data for custom fields into hash tables (defvar *preparse-hash-init?* nil) diff --git a/parse-common.lisp b/parse-common.lisp index 28a57db..b8439fa 100644 --- a/parse-common.lisp +++ b/parse-common.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: parse-common.lisp -;;;; Purpose: Common, stable parsing routines for UMLisp -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: parse-common.lisp +;;;; Purpose: Common, stable parsing routines for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -18,9 +18,6 @@ (in-package #:umlisp) -(eval-when (:compile-toplevel) - (declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3)))) - (defun ensure-ucols+ufiles (&optional (alwaysclear nil)) "Initialize all UMLS file and column structures if not already initialized" (when (or alwaysclear (null *umls-files*)) @@ -90,8 +87,8 @@ Currently, these are the LEX and NET files." (defun ufiles-to-measure () "Returns a list of ufiles to measure" (loop for ufile in *umls-files* - unless (or (char= #\M (char (fil ufile) 0)) - (char= #\m (char (fil ufile) 0))) + unless (or (char= #\M (schar (fil ufile) 0)) + (char= #\m (schar (fil ufile) 0))) collect ufile)) @@ -101,6 +98,7 @@ Currently, these are the LEX and NET files." (defun file-field-lengths (filename) "Returns a list of FILENAME MAX AV" + (declare (optimize (speed 3) (safety 0))) (let (fields-max fields-av num-fields (count-lines 0)) (with-umls-file (line filename) (unless num-fields diff --git a/parse-macros.lisp b/parse-macros.lisp index 66a54fd..e71ba1d 100644 --- a/parse-macros.lisp +++ b/parse-macros.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: parse-macros.lisp -;;;; Purpose: Macros for UMLS file parsing -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: parse-macros.lisp +;;;; Purpose: Macros for UMLS file parsing +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. diff --git a/run-tests.lisp b/run-tests.lisp index 3221a32..d47eba8 100644 --- a/run-tests.lisp +++ b/run-tests.lisp @@ -1,3 +1,22 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: parse-macros.lisp +;;;; Purpose: Macros for UMLS file parsing +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UMLisp, is +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. +;;;; +;;;; UMLisp users are granted the rights to distribute and use this software +;;;; as governed by the terms of the GNU General Public License. +;;;; ************************************************************************* + + (defpackage #:run-tests (:use #:cl)) (in-package #:run-tests) @@ -8,7 +27,7 @@ (require 'hyperobject) (load "umlisp.asd") (load "umlisp-tests.asd") -(asdf:oos 'asdf:test-op 'umlisp) +(asdf:operate 'asdf:test-op 'umlisp) (defun quit (&optional (code 0)) "Function to exit the Lisp implementation. Copied from CLOCC's QUIT function." diff --git a/sql-classes.lisp b/sql-classes.lisp index 3611654..2841201 100644 --- a/sql-classes.lisp +++ b/sql-classes.lisp @@ -2,10 +2,10 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: sql-classes.lisp -;;;; Purpose: Routines for reading UMLS objects from SQL database -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: sql-classes.lisp +;;;; Purpose: Routines for reading UMLS objects from SQL database +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; diff --git a/sql.lisp b/sql.lisp index d3132ab..86f6893 100644 --- a/sql.lisp +++ b/sql.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: sql.lisp -;;;; Purpose: Low-level SQL routines data for UMLisp -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: sql.lisp +;;;; Purpose: Low-level SQL routines data for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. diff --git a/utils.lisp b/utils.lisp index 1e4a70a..974da72 100644 --- a/utils.lisp +++ b/utils.lisp @@ -2,15 +2,15 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: utils.lisp -;;;; Purpose: Low-level utility functions for UMLisp -;;;; Author: Kevin M. Rosenberg -;;;; Date Started: Apr 2000 +;;;; Name: utils.lisp +;;;; Purpose: Low-level utility functions for UMLisp +;;;; Author: Kevin M. Rosenberg +;;;; Created: Apr 2000 ;;;; ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -34,45 +34,52 @@ (defun parse-ui (s &optional (nullvalue 0)) "Return integer value for a UMLS unique identifier." + (declare (simple-string s) + (optimize (speed 3) (safety 0))) (if (< (length s) 2) nullvalue (nth-value 0 (parse-integer s :start 1)))) (defun parse-cui (cui) + (declare (optimize (speed 3) (safety 0))) (if (stringp cui) - (let ((ch (char cui 0))) + (let ((ch (schar cui 0))) (if (char-equal ch #\C) (parse-ui cui) (nth-value 0 (parse-integer cui)))) cui)) (defun parse-lui (lui) + (declare (optimize (speed 3) (safety 0))) (if (stringp lui) - (let ((ch (char lui 0))) + (let ((ch (schar lui 0))) (if (char-equal ch #\L) (parse-ui lui) (nth-value 0 (parse-integer lui)))) lui)) (defun parse-sui (sui) + (declare (optimize (speed 3) (safety 0))) (if (stringp sui) - (let ((ch (char sui 0))) + (let ((ch (schar sui 0))) (if (char-equal ch #\S) (parse-ui sui) (nth-value 0 (parse-integer sui)))) sui)) (defun parse-tui (tui) + (declare (optimize (speed 3) (safety 0))) (if (stringp tui) - (let ((ch (char tui 0))) + (let ((ch (schar tui 0))) (if (char-equal ch #\T) (parse-ui tui) (nth-value 0 (parse-integer tui)))) tui)) (defun parse-eui (eui) + (declare (optimize (speed 3) (safety 0))) (if (stringp eui) - (let ((ch (char eui 0))) + (let ((ch (schar eui 0))) (if (char-equal ch #\E) (parse-ui eui) (nth-value 0 (parse-integer eui)))) -- 2.34.1