Finish implementation of query inside amb-evaluator
This commit is contained in:
@@ -329,8 +329,6 @@
|
||||
(apply-in-underlying-scheme
|
||||
(primitive-implementation proc) args))
|
||||
|
||||
|
||||
|
||||
(define input-prompt ";;; M-Eval input:")
|
||||
(define output-prompt ";;; M-Eval value:")
|
||||
|
||||
@@ -394,7 +392,6 @@
|
||||
((if-fail? exp) (analyze-if-fail exp))
|
||||
((lambda? exp) (analyze-lambda exp))
|
||||
((begin? exp) (analyze-sequence (begin-actions exp)))
|
||||
((apply? exp) (analyze-apply (cdr exp)))
|
||||
((cond? exp) (analyze (cond->if exp)))
|
||||
((let? exp) (analyze (let->combination exp))) ;**
|
||||
((amb? exp) (analyze-amb exp)) ;**
|
||||
@@ -406,12 +403,6 @@
|
||||
(else
|
||||
(error "Unknown expression type -- ANALYZE" exp))))
|
||||
|
||||
(define (apply? exp) (tagged-list? exp 'apply))
|
||||
(define (analyze-apply exp)
|
||||
(display "ANALYZE-APPLY ") (newline)
|
||||
(display exp)
|
||||
(lambda (env succeed fail) (succeed #t fail)))
|
||||
|
||||
(define (ambeval exp env succeed fail)
|
||||
((analyze exp) env succeed fail))
|
||||
|
||||
@@ -682,8 +673,10 @@
|
||||
(list 'abs abs)
|
||||
(list 'assoc assoc)
|
||||
(list 'append append)
|
||||
(list 'caddr caddr)
|
||||
(list 'cadr cadr)
|
||||
(list 'car car)
|
||||
(list 'cddr cddr)
|
||||
(list 'cdr cdr)
|
||||
(list 'cons cons)
|
||||
(list 'display display)
|
||||
|
||||
Reference in New Issue
Block a user