SICP OpenCourse 12 : L8B-Logic P

2020-08-15  本文已影响0人  牛头酋长

SICP OpenCourse (Structure and Interpretation of Computer Programs)

PART 1

1.POINT: USE PATTERN MATCHER TO IMPLEMENT THE NEW LOGIC LANGUAGE

2.LET'S TALK ABOUT HOW IT'S IMPLEMENTED. AT THE BOTTOM OF IT, THERE'S A PATTERN MATCHER

3.SAMPLE PATTERNS

(a ?x c)
(job ?x (computer ?y)
(job ?x (computer . ?y)
(a ?x ?x)
(?x ?y ?y ?x)
(a . ?x)

(MATCH pat data dictionary)

=>(?x ?y ?y ?x)(a b b a)

=>(?x ?y ?y ?x)(a b b a)

4.CLOSED WORLD ASSUMPTION

    - Anything that I cannot deduce from what I know is not true.

    - If I don't know anything about x, and x isn't true.

上一篇 下一篇

猜你喜欢

热点阅读