6ed3375e2921

Remove the `.wam` package now that paip is gone
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 23 Aug 2016 23:31:13 +0000
parents df709571ebe3
children f0f90671d4dc
branches/tags (none)
files docs/03-reference.markdown package-test.lisp package.lisp src/bytecode.lisp src/compiler/0-data.lisp src/compiler/1-parsing.lisp src/compiler/2-register-allocation.lisp src/compiler/3-flattening.lisp src/compiler/4-tokenization.lisp src/compiler/5-precompilation.lisp src/compiler/6-optimization.lisp src/compiler/7-rendering.lisp src/compiler/8-ui.lisp src/constants.lisp src/dump.lisp src/types.lisp src/ui.lisp src/vm.lisp src/wam.lisp

Changes

--- a/docs/03-reference.markdown	Tue Aug 23 23:28:04 2016 +0000
+++ b/docs/03-reference.markdown	Tue Aug 23 23:31:13 2016 +0000
@@ -12,3 +12,112 @@
 
 ## Package `TEMPERANCE`
 
+### `FACT` (macro)
+
+    (FACT DATABASE FACT)
+
+### `FACTS` (macro)
+
+    (FACTS DATABASE
+      &BODY
+      FACTS)
+
+### `FINALIZE-LOGIC-FRAME` (function)
+
+    (FINALIZE-LOGIC-FRAME DATABASE)
+
+### `INVOKE-FACT` (function)
+
+    (INVOKE-FACT DATABASE FACT)
+
+### `INVOKE-FACTS` (function)
+
+    (INVOKE-FACTS DATABASE &REST FACTS)
+
+### `INVOKE-PROVE` (function)
+
+    (INVOKE-PROVE DATABASE &REST TERMS)
+
+### `INVOKE-QUERY` (function)
+
+    (INVOKE-QUERY DATABASE &REST TERMS)
+
+### `INVOKE-QUERY-ALL` (function)
+
+    (INVOKE-QUERY-ALL DATABASE &REST TERMS)
+
+### `INVOKE-QUERY-DO` (function)
+
+    (INVOKE-QUERY-DO DATABASE FUNCTION &REST TERMS)
+
+### `INVOKE-QUERY-FIND` (function)
+
+    (INVOKE-QUERY-FIND DATABASE PREDICATE &REST TERMS)
+
+### `INVOKE-QUERY-MAP` (function)
+
+    (INVOKE-QUERY-MAP DATABASE FUNCTION &REST TERMS)
+
+### `INVOKE-RULE` (function)
+
+    (INVOKE-RULE DATABASE HEAD &REST BODY)
+
+### `MAKE-DATABASE` (function)
+
+    (MAKE-DATABASE)
+
+### `POP-LOGIC-FRAME` (function)
+
+    (POP-LOGIC-FRAME DATABASE)
+
+### `PROVE` (macro)
+
+    (PROVE DATABASE &REST TERMS)
+
+### `PUSH-LOGIC-FRAME` (function)
+
+    (PUSH-LOGIC-FRAME DATABASE)
+
+### `PUSH-LOGIC-FRAME-WITH` (macro)
+
+    (PUSH-LOGIC-FRAME-WITH DATABASE
+      &BODY
+      BODY)
+
+### `QUERY` (macro)
+
+    (QUERY DATABASE &REST TERMS)
+
+### `QUERY-ALL` (macro)
+
+    (QUERY-ALL DATABASE &REST TERMS)
+
+### `QUERY-DO` (macro)
+
+    (QUERY-DO DATABASE FUNCTION &REST TERMS)
+
+### `QUERY-FIND` (macro)
+
+    (QUERY-FIND DATABASE PREDICATE &REST TERMS)
+
+### `QUERY-MAP` (macro)
+
+    (QUERY-MAP DATABASE FUNCTION &REST TERMS)
+
+### `RESET-STANDARD-DATABASE` (function)
+
+    (RESET-STANDARD-DATABASE)
+
+### `RULE` (macro)
+
+    (RULE DATABASE
+        HEAD
+      &BODY
+      BODY)
+
+### `WITH-FRESH-DATABASE` (macro)
+
+    (WITH-FRESH-DATABASE
+      &BODY
+      BODY)
+
--- a/package-test.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/package-test.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -5,7 +5,7 @@
   (:use
     #:cl
     #:1am
-    #:temperance.wam
+    #:temperance
     #:temperance.quickutils)
   (:export
     #:fail
@@ -26,8 +26,8 @@
     #:1am
     #:temperance-test.utils
     #:temperance.quickutils
-    #:temperance.wam)
-  (:import-from #:temperance.wam
+    #:temperance)
+  (:import-from #:temperance
     #:with-database
     #:make-database
     #:with-fresh-database
@@ -48,8 +48,8 @@
     #:1am
     #:temperance-test.utils
     #:temperance.quickutils
-    #:temperance.wam)
-  (:import-from #:temperance.wam
+    #:temperance)
+  (:import-from #:temperance
     #:with-fresh-database
     #:push-logic-frame-with
     #:rule
@@ -68,8 +68,8 @@
     #:1am
     #:temperance-test.utils
     #:temperance.quickutils
-    #:temperance.wam)
-  (:import-from #:temperance.wam
+    #:temperance)
+  (:import-from #:temperance
     #:with-fresh-database
     #:push-logic-frame-with
     #:rule
--- a/package.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/package.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,23 +1,3 @@
-(defpackage #:temperance.internal
-  (:use #:cl))
-
-(in-package #:temperance.internal)
-
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
-  (defun external-symbols (package)
-    (let ((symbols nil))
-      (do-external-symbols (s (find-package package) symbols)
-        (push s symbols)))))
-
-(defmacro defpackage-inheriting (name parent-packages &rest args)
-  `(defpackage ,name
-     ,@args
-     ,@(loop :for parent-package :in parent-packages
-             :collect `(:use ,parent-package)
-             :collect `(:export ,@(external-symbols parent-package)))))
-
-
 (defpackage #:temperance.utils
   (:use
     #:cl
@@ -74,7 +54,7 @@
     #:circle-insert-beginning
     #:circle-insert-end))
 
-(defpackage #:temperance.wam
+(defpackage #:temperance
   (:use
     #:cl
     #:cl-arrows
@@ -118,6 +98,3 @@
     #:?
     #:!))
 
-
-(defpackage-inheriting #:temperance (#:temperance.wam)
-  (:use #:cl))
--- a/src/bytecode.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/bytecode.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 
 ;;;; Opcodes
--- a/src/compiler/0-data.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/0-data.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; .-,--.      .
 ;;;; ' |   \ ,-. |- ,-.
--- a/src/compiler/1-parsing.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/1-parsing.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; .-,--.
 ;;;;  '|__/ ,-. ,-. ,-. . ,-. ,-.
--- a/src/compiler/2-register-allocation.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/2-register-allocation.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; .-,--.               .               ,.   .  .              .
 ;;;;  `|__/ ,-. ,-. . ,-. |- ,-. ,-.     / |   |  |  ,-. ,-. ,-. |- . ,-. ,-.
--- a/src/compiler/3-flattening.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/3-flattening.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; .-,--' .      .  .
 ;;;;  \|__  |  ,-. |- |- ,-. ,-. . ,-. ,-.
--- a/src/compiler/4-tokenization.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/4-tokenization.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; ,--,--'  .                     .
 ;;;; `- | ,-. | , ,-. ,-. . ,_, ,-. |- . ,-. ,-.
--- a/src/compiler/5-precompilation.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/5-precompilation.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; .-,--.                             .      .
 ;;;;  '|__/ ,-. ,-. ,-. ,-. ,-,-. ,-. . |  ,-. |- . ,-. ,-.
--- a/src/compiler/6-optimization.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/6-optimization.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; ,,--.     .                    .
 ;;;; |`, | ,-. |- . ,-,-. . ,_, ,-. |- . ,-. ,-.
--- a/src/compiler/7-rendering.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/7-rendering.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; .-,--.           .
 ;;;;  `|__/ ,-. ,-. ,-| ,-. ,-. . ,-. ,-.
--- a/src/compiler/8-ui.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/compiler/8-ui.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; ,-.  .                 ,-_/     .
 ;;;;   |  |   ,-. ,-. ,-.   '  | ,-. |- ,-. ,-. ," ,-. ,-. ,-.
--- a/src/constants.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/constants.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 (defmacro define-constants (count-symbol &rest symbols)
   `(progn
--- a/src/dump.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/dump.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 (defun heap-debug (wam address indent-p)
   (format
--- a/src/types.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/types.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ; (deftype cell-type () ; todo: pick one of these...
 ;   `(integer 0 ,(1- +number-of-cell-types+)))
--- a/src/ui.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/ui.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 
 ;;;; Database
--- a/src/vm.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/vm.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; Config
 (defvar *step* nil)
--- a/src/wam.lisp	Tue Aug 23 23:28:04 2016 +0000
+++ b/src/wam.lisp	Tue Aug 23 23:31:13 2016 +0000
@@ -1,4 +1,4 @@
-(in-package #:temperance.wam)
+(in-package #:temperance)
 
 ;;;; WAM
 (defun allocate-wam-code (size)