Skip to Content
深入理解運算原理|從簡單的機器到無所不能的程式
book

深入理解運算原理|從簡單的機器到無所不能的程式

by Tom Stuart
November 2017
Beginner to intermediate
344 pages
7h 2m
Chinese
GoTop Information, Inc.
Content preview from 深入理解運算原理|從簡單的機器到無所不能的程式
226
|
7
利用
#minimize
,並且重複呼叫用來執行單一模擬步驟的基元遞迴函式,就可以完全模
擬圖靈機。模擬物會持續到機器停止,但如果一直不發生,就會永遠執行。
SKI 組合器演算
SKI
組合器演算
SKI combinator calculus
)是操縱運算式語法的規則系統,就如同 lambda
演算。雖然 lambda 演算已經非常簡單,但它還是有 3 種運算式(變數、函式、呼叫),
而我們曾在第 208 頁『語意』看到,變數會讓化簡的規則變得有點複雜。SKI 演算甚至
更為簡單,只有兩種運算式呼叫和字母
符號
symbol
),而且規則也更為簡單。它所有
的威力來自 3 個特殊符號:
S
K
I
,稱為
組合器
combinator
),每個都有自己的化簡
規則:
S[
a
][
b
][
c
]
化簡成
a
[
c
][
b
[
c
]]
,其中
a
b
c
可以是任何的 SKI 演算運算式。
K[
a
][
b
]
化簡成
a
I[
a
]
化簡成
a
例如以下是化簡運算式
I[S][K][S][I[K]]
的其中一種方式:
I[S][K][S][I[K]] S[K][S][I[K]] (
reduce I[S] to S
)
S[K][S][K] (
reduce I[K] to K
)
K[K][S[K]] (
reduce S[K][S][K] to K[K][S[K]]
)
K (
reduce K[K][S[K]] to K
)
請注意,這裡沒有繼續替換 lambda 演算樣式的變數,只是根據化簡規則針對符號進行 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JSON實務手冊

JSON實務手冊

Tom Marrs

Publisher Resources

ISBN: 9789864766000