Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Changes to support SDR in spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
porcuquine committed Oct 10, 2019
1 parent e717de4 commit 649e0cf
Show file tree
Hide file tree
Showing 6 changed files with 235 additions and 76 deletions.
8 changes: 4 additions & 4 deletions base/lang.lisp
Expand Up @@ -337,7 +337,7 @@
DRG (Flag, Other) [Dependency, Dep2]:
declare(degree_base, integer)
drg_e = 0.80
describe(drg_e, \"Epsilon\")
describe(drg_e, \"Epsilon\", number)
drg_d = 1/4
Chung:
declare(degree_chung, integer)
Expand Down Expand Up @@ -375,7 +375,7 @@
:SUB-DEFINITIONS NIL)
(DECLARE DEGREE-BASE
INTEGER)
(SETQ DRG-E 0.8) (DESCRIBE DRG-E "Epsilon") (SETQ DRG-D (/ 1 4)))
(SETQ DRG-E 0.8) (DESCRIBE DRG-E "Epsilon" number) (SETQ DRG-D (/ 1 4)))
(#S(DEFINITION
:NAME *CHUNG
:FLAGS NIL
Expand Down Expand Up @@ -427,7 +427,7 @@
:DECLARATIONS ((DECLARE
DEGREE-BASE
INTEGER))
:DESCRIPTIONS ((DESCRIBE DRG-E "Epsilon"))
:DESCRIPTIONS ((DESCRIBE DRG-E "Epsilon" number))
:CONSTRAINTS ((DRG-E 0.8)
(DRG-D (/ 1 4)))
:SUB-DEFINITIONS NIL)
Expand Down Expand Up @@ -476,7 +476,7 @@
(MAYBE-CREATE-SCHEMA
'((DESCRIBE
DRG-E
"Epsilon"))))
"Epsilon" number))))
(DEFCONSTRAINT-SYSTEM *CHUNG
((DEGREE-CHUNG-INTEGER%
(INTEGER
Expand Down
9 changes: 8 additions & 1 deletion base/orient.lisp
Expand Up @@ -149,9 +149,16 @@
(system-subsystems system)))))

(defun lookup-description (attribute schemable)
(let ((parameter (lookup- attribute schemable)))
(let ((parameter (lookup-parameter attribute schemable)))
(and parameter (parameter-description parameter))))

(defun lookup-type (attribute schemable)
(let ((parameter (lookup-parameter attribute schemable)))
(and parameter (parameter-type parameter))))

(defun lookup-parameter (attribute schemable)
(lookup- attribute schemable))

(defgeneric implementation-function (implementation)
(:method ((impl implementation))
(awhen (find-symbol (implementation-name impl) (implementation-module impl))
Expand Down
2 changes: 1 addition & 1 deletion base/packages.lisp
Expand Up @@ -51,7 +51,7 @@
:implementation :implementation-module :implementation-name :isetq
:link
:log2 :logn
:tref :trf :join :lookup-description :make-relation :make-relation+
:tref :trf :join :lookup-description :lookup-type :make-relation :make-relation+
:make-signature :make-tuple :make-tuple* :make-tuple+ :operation
:orient-tests :optimal-heights
:org-present :org-present-tuple
Expand Down
4 changes: 2 additions & 2 deletions base/presentation.lisp
Expand Up @@ -72,7 +72,7 @@
(eql (char name (1- (length name))) #\%)))
all-attributes))))
(cons
'("Parameter" "Value" "Description")
'("Parameter" "Type" "Value" "Description")
(loop for attr in attrs-to-use
collect (list attr (tref attr tuple) (or (lookup-description attr system) ""))))))
collect (list attr (or (lookup-type attr system) "") (tref attr tuple) (or (lookup-description attr system) ""))))))

0 comments on commit 649e0cf

Please sign in to comment.