; Metalinguistic Abstraction II with Hal ; Implementing a declarative/logical programming language. ; How does the pattern-matcher work? ; => 8B:(4m32s) What is a primitive QUERY? ; Implementing the Means of Combination. ; => 8B:(16m55s) Coming back to the concept of CLOSURE. ; interesting QUESTIONS 8B:(17m5s) => 8B:(22m9s) BREAK ; Implementing the Means of Abstraction. ; 8B:(27m31s) => We need a more general pattern-matcher ; which is called a UNIFIER. ; 8B:(30m26s) => The hard cases, where fixed-point equations ; must be solved... are skipped. ;;; FORMAL DEFINITION ; To Apply a Rule ; Evaluate the rule body relative to an environment formed ; by unifying the rule conclusion with the given query. ; To Apply a Procedure ; Evaluate the procedure body relative to an environment ; formed by binding the procedure parameters to the arguments. ; 8B:(36m18s) A tiny technical problem: variable-conflicts ; => need for local variables. ; Fundamental QUESTIONS 8B:(38m21s) => 8B:(47m50s) BREAK ; Logic programming is NOT the same as logic. ; Classical logic: ; ALL HUMANS ARE MORTAL. ; ALL GREEKS ARE HUMAN. ; SOCRATES IS A GREEK. ; . . . ; SOCRATES IS MORTAL. ; Logic Database: ; (Greek Socrates) (Greek Plato) ; (Greek Zeus) mo Zeus) ; ; (rule (mortal ?x) (human ?x)) ; (rule (fallible ?x) (human ?x)) ; ; (rule (human ?x) ; (and (Greek ?x) (not mo ?x)))) ; (rule (address ?x Olympus) ; (and (Greek ?x) mo ?x))) ; (rule (perfect ?x) ; (and (not (mortal ?x)) ; (not (fallible ?x)))) ; ; (and (address ?x ?y) ; (perfect ?x)) ; => OLYMPUS ; (and (perfect ?x) ; (address ?x ?y)) ; => [NOTHING] ; "Not is not NOT (in the logical sense)." --Hal ; 8B:(58m27s) How to fix the wrong answer? ; ...WAIT ; 8B:(58m50s) "Which of these is the right answer?" --Hal ; How did the system deduce OLYMPUS? ; There are no clues that Zeus is not mortal or fallible. ; 8B:(1h3m58s) "How do you bridge the gap from this world ; of logic and relations to the worlds of more ; traditional languages and somehow combine ; the power of both?" --Hal ; important QUESTIONS (END)