本課程將講授程式語言領域之入門理論與知識,希望培養學生以型式邏輯進行清晰思考的能力,了解邏輯與程式語言、型別系統的密切關係,以及型別系統在程式語言中扮演的角色,使學生能以遞迴/迭構方式理解並解決程式設計問題,能運用軟體工具輔助邏輯推理及證明程式正確性,並具備進一步探索程式語言相關領域的知識基礎。
本次特別講題將重返中研院資訊所講師群鑽研已久的主題「依值型別編程」(dependently typed programming),接力呈現其各個面向。
依值型別之表達能力遠超過主流語言的型別系統,一些原先需要另外證明的程式性質可直接編寫為依值型別,程式只要通過型別檢查即可保證性質成立。
當程式員透過依值型別提供更多資訊給型別檢查器 (type-checker),後者就能反過來隨時告訴程式員當下已知與尚待滿足的條件,互動地寫出正確程式。
依值型別語言的表達能力強到能夠將數學型式化,數學定理與證明在依值型別語言中表達出來後,不僅能保證推論過程正確無誤,還一定具有計算意義。
歡迎一同來體驗數學、邏輯、計算融為一體的舒暢感!
Formal verification, the act of reasoning about program correctness using mathematical logic, is often considered hard to conduct and labor-intensive, and thus only applicable to tiny programs or life-critical systems. However, with the advance of theory and tools, many real-world systems such as compilers and operating systems have been successfully verified over the last decade. In the first part of this talk, I will first talk about what it is to be a “correct program,” then introduce some verification techniques, and finally conclude with a simple demonstration, in which a small program will be verified. In the second part, I will share the experience of verifying a flash translation layer, a key software component in many solid-state drives. In particular, I will cover its formal specification, how we modeled the behavior of system crashes, the verification approach we used, and the challenges we met.