Browse Source

Add `to-sexp` operation as part of protocol

Samuel W. Flint 5 years ago
parent
commit
712f3853ad
1 changed files with 17 additions and 24 deletions
  1. 17 24
      larcs.org

+ 17 - 24
larcs.org

@@ -67,7 +67,7 @@ While the [[id:f3e3cdb9-a661-4598-8be1-e15f587f35bb][Introduction]] describes th
 #+TOC: headlines 3
 #+TOC: listings
 
-* WORKING Expression Types [3/4]
+* WORKING Expression Types [0/4]
 :PROPERTIES:
 :ID:       fe611e8f-db42-4fe0-8e77-9cfb55d2227c
 :END:
@@ -108,7 +108,10 @@ Note, by default, ~eqal~ will handle ~type-error~ by trying to switch the order
   (defgeneric evaluate (expression &key substitutions-list resolve-constants-light-p resolve-constants-hard-p))
 
   @export
-  (defgeneric simplify (expression &key resolve-constans-light-p resolve-constants-hard-p))
+  (defgeneric simplify (expression &key resolve-constants-light-p resolve-constants-hard-p))
+
+  @export
+  (defgeneric to-sexp (expression &optional resolve-constants-p))
 #+END_SRC
 
 #+Caption: Types
@@ -161,7 +164,7 @@ Note, by default, ~eqal~ will handle ~type-error~ by trying to switch the order
 [[file:img/types.png]]
 
 
-** DONE Atomic Types [3/3]
+** WORKING Atomic Types [0/3]
 :PROPERTIES:
 :ID:       9be57f5d-ed0e-4a7c-9c06-a4c647f6d56e
 :END:
@@ -182,8 +185,7 @@ Of the various types, there are three atomic types, ~<number>~, ~<variable>~ and
     t)
 #+END_SRC
 
-*** DONE Numbers
-CLOSED: [2019-01-05 Sat 09:56]
+*** WORKING Numbers
 :PROPERTIES:
 :ID:       f0314608-46d9-4cc0-a3e1-897481827ddf
 :END:
@@ -206,8 +208,7 @@ As an ~<atomic>~, ~<number>~ is rather simple, having only one slot, ~value~, re
     (= (value expression-a) (value expression-b)))
 #+END_SRC
 
-*** DONE Variables
-CLOSED: [2019-01-05 Sat 09:56]
+*** WORKING Variables
 :PROPERTIES:
 :ID:       f5f656d0-6253-4c4c-8c50-6622d685eaa1
 :END:
@@ -231,8 +232,7 @@ CLOSED: [2019-01-05 Sat 09:56]
             (value expression-b)))
 #+END_SRC
 
-*** DONE Constants
-CLOSED: [2019-01-05 Sat 12:07]
+*** WORKING Constants
 :PROPERTIES:
 :ID:       806bbce0-ab52-411a-8178-29bda6bbb36a
 :END:
@@ -273,7 +273,7 @@ Equality of constants is a bit different, and is checked as follows:
        (slot-value expression-b 'value)))
 #+END_SRC
 
-** DONE Compound Types [7/7]
+** WORKING Compound Types [0/7]
 :PROPERTIES:
 :ID:       a0d2eb19-8a1e-4dee-9b41-c454a49cacc4
 :END:
@@ -291,8 +291,7 @@ Compound types are the majority of expressions.  An atom is well and good, but o
     nil)
 #+END_SRC
 
-*** DONE Additions
-CLOSED: [2019-01-05 Sat 16:00]
+*** WORKING Additions
 :PROPERTIES:
 :ID:       a1a01fb4-59e1-4459-9ab9-d32269af77dd
 :END:
@@ -317,8 +316,7 @@ CLOSED: [2019-01-05 Sat 16:00]
                                :test #'eqal)))))
 #+END_SRC
 
-*** DONE Subtractions
-CLOSED: [2019-01-05 Sat 16:41]
+*** WORKING Subtractions
 :PROPERTIES:
 :ID:       aad16971-81c8-48da-aaa5-bb84b03d6912
 :END:
@@ -345,8 +343,7 @@ Subtractions again, contain only a list of terms.  However, unlike other types h
               ((or (not keep) (null a) (null b)) keep)))))
 #+END_SRC
 
-*** DONE Multiplications
-CLOSED: [2019-01-05 Sat 12:17]
+*** WORKING Multiplications
 :PROPERTIES:
 :ID:       0c601f5c-a614-4c30-9107-220a5d45a334
 :END:
@@ -369,8 +366,7 @@ Multiplication is one of the more frequently used expression types, and is, surp
                              :test #'eqal))))
 #+END_SRC
 
-*** DONE Divisions
-CLOSED: [2019-01-05 Sat 12:25]
+*** WORKING Divisions
 :PROPERTIES:
 :ID:       bcc56ff0-0a6f-4eb6-8185-2cab3eed99da
 :END:
@@ -396,8 +392,7 @@ Division is similar to ~<multiplication>~, although instead of having ~terms~ it
                (div-denominator expression-b))))
 #+END_SRC
 
-*** DONE Exponentials
-CLOSED: [2019-01-05 Sat 15:28]
+*** WORKING Exponentials
 :PROPERTIES:
 :ID:       d8c87457-5c3b-4263-ba60-53b9b9f5e816
 :END:
@@ -434,8 +429,7 @@ There are two primary forms of exponential -- the natural (~exp~) and the genera
                    :value 2.71828))
 #+END_SRC
 
-*** DONE Logarithmics
-CLOSED: [2019-01-05 Sat 15:47]
+*** WORKING Logarithmics
 :PROPERTIES:
 :ID:       7d4a23af-6c6b-4ae3-a8af-e477cbee9082
 :END:
@@ -573,8 +567,7 @@ Trigonemtric functions are also a bit weird -- as given a "normal" trig function
   (defclass <acoth> (<hyperbolic-trig> <inverse-trig>) ())
 #+END_SRC
 
-** DONE Blended Types -- Polynomial Terms
-CLOSED: [2019-01-05 Sat 09:46]
+** WORKING Blended Types -- Polynomial Terms
 :PROPERTIES:
 :ID:       a7258c20-bdd1-4565-9ada-41026ea5e1a0
 :END: