Expressions | Branches | Code Forms | Functions | ||||||||||||
Total | Entered | % entered | Fully covered | % fully covered | total unreached | Total | Covered | % covered | Total | Fully covered | % fully covered | Partly covered | % partly covered | Not entered | % not entered |
1 (defpackage #:alu.spec
2 (:documentation "the type specification and layout of the alu
3 package and alu terms")
4 (:use #:common-lisp #:serapeum)
5 (:local-nicknames (:util :alu.utils)
6 (:stack :alu.stack))
7 (:export
8
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10 ;;; Mixin Services
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
13 ;; Generic Data Manipulation
14 :direct-slots-mixin
15 :protect-slots-mixin
16
17 ;; Meta data information
18 :stack-mixin
19 :meta-mixin
20
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 ;; Operations on data traversal
23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24 :protected
25 :protect-slots
26 :direct-slots
27 :direct-slot-names
28 :direct-slot-keywords
29 :direct-slot-values
30 :update-from-alist
31
32 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
33 ;; Operations on meta data
34 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
35 :stack
36 :copy-meta
37
38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
39 ;; found in term
40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
41
42 ;; New Top Level Term Variants Defined
43 :expression
44 :term
45 :term-no-binding
46 :base
47 :type-manipulation
48 :term-type-manipulation
49 :record-forms
50 :array-forms
51 :term-normal-form
52
53 ;; Term ADT Constructors Defined
54 :application :func :arguments
55 :primitive :name
56 :record :name :contents
57 :record-lookup :record :field
58 :let-node :var :value
59 :reference :name
60 :bind-constraint :var :value
61 :type-coerce :value :typ
62 :type-check :value :typ
63 :from-data :contents
64 :array-allocate :size :typ
65 :array-lookup :arr :pos
66 :array-set :arr :pos :value
67
68 ;; Term Applications Defined
69 :make-application
70 :make-record :lookup-record :make-record-lookup
71 :make-type-check :make-type-coerce
72 :make-from-data :make-array-allocate :make-array-lookup :make-array-set
73 :make-let :make-reference :make-bind-constraint
74
75 ;; Functions
76 :record->alist
77
78 ;; Misc pattern matching functions
79 :number
80
81 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
82 ;;; found in type
83 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
84
85 ;; New Top Level Term Variants Defined
86 :type-reference
87 :type-reference-full
88
89 ;; New Types Defined Type-Storage
90 :reference-type :name
91
92 ;; New Array Abstractions
93 :array-type :array-type-len :array-type-content
94
95 ;; Functions
96 :to-type-reference-format
97
98 ;; New Constructors Defined
99 :make-type-reference :make-primitive
100 :make-type-declaration :make-record-declaration
101
102 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
103 ;; found in global
104 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
105
106 ;; New Top Level Term Variants Defined
107 :function-type
108 :type-storage
109
110 ;; New Types Defined Function-type
111 :circuit :name :arguments :expanded-arguments :return-type :body :exec
112
113 :privacy
114 :constraint :name :typ
115
116 ;; New Types Defined Type-Storage
117 :type-declaration :name :generics :options :decl
118
119 :type-format
120 :record-decl :contents :order
121 :sum-decl
122
123 ;; Functions
124 :record-declaration->alist
125
126 ;; New Constructors Defined
127 :make-circuit
128 :make-constraint))
129
130 (defpackage #:alu.storage
131 (:documentation "Serves as the long term storage of any Alucard Circuit")
132 (:use #:common-lisp #:serapeum)
133 (:local-nicknames (:format :alu.spec))
134 (:export
135 :*types*
136 :*functions*
137 :add-function :add-type
138 :lookup-function :lookup-type
139 :swap-tables :restore-tables
140 :currently-swapped?
141 ;; Entry point operations
142 :get-entry-point
143 :set-entry-point))
144
145 (defpackage #:alu.spec.emit
146 (:documentation "Emits to the real body of a circuit declaration. By this, we mean
147 that we modify the current body in scope with the given instruction.")
148 (:use #:common-lisp #:serapeum)
149 (:local-nicknames (:spc :alu.spec)
150 (:storage :alu.storage))
151 (:export :with-circuit-body :instruction))
152
153 (defpackage #:alu.spec.type-op
154 (:documentation "Provides basic operations on types")
155 (:use #:common-lisp #:serapeum)
156 (:local-nicknames (:spc :alu.spec)
157 (:storage :alu.storage))
158 (:export :primitive? :array-reference? :void-reference? :int-reference?
159 :record-reference?))
160
161 (defpackage #:alu.spec.term-op
162 (:documentation "Provides basic operations on types")
163 (:shadow :exp :coerce :=)
164 (:use #:common-lisp #:serapeum)
165 (:local-nicknames (:spc :alu.spec)
166 (:storage :alu.storage))
167 (:export :add :times :exp :coerce := :void-reference?))