RYAN'S WEBSITE

Just something small and tiny.

Held by Ryan Ruoshui Yan.


Here is the world of a nerdy guy.

Visited:

Logic Programming Notes

Disclaimer: The notes below are fully/partially NOT created by myself. They are from slides and/or wikipedia and/or textbook. The purpose of this post is simply to learn and review for the course. If you think something is inappropriate, please contact me at “ryan_yrs [at] hotmail [dot] com” immediately and I will remove it as soon as possible.

Logic Programming 邏輯編程

  • Determining the truth or falsehood of statements.
  • A type of programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain.
  • 是種編程范型,它設置答案須匹配的規則來解決問題,而非設置步驟來解決問題。過程是:事實+規則=結果。邏輯編程的要點是將正規的邏輯風格帶入計算機程序設計之中。數學家和哲學家發現邏輯是有效的理論分析工具。很多問題可以自然地表示成一個理論。說需要解答一個問題,通常與解答一個新的假設是否跟現在的理論無衝突等價。邏輯提供了一個證明問題是真還是假的方法。創建證明的方法是人所皆知的,故邏輯是解答問題的可靠方法。邏輯編程系統則自動化了這個程序。人工智能在邏輯編程的發展中發揮了重要的影響。
  • e.g. Prolog

Fact

  • A statement that is unconditionally true.
  • These are expressed using PREDICATES, which can take >= 1 TERMS.
  • A rule with no goals on the right side.

Predicate

  • Unlike functions, predicates are never “called”.
  • Unlike functions, predicates cannot be “evaluated” to be replaced by a simpler result.
  • Unlike functions, predicates can be compared for equality at a purely structural level.

Goal

  • A predicate in a query.
  • Which can either succeed or fail.

Definition

A predicate is true if some related predicate holds.

Rule

Unlike facts, rules represent CONDITIONAL truths. We interpret these rules by replacing “:-“ with “if”.

RECENT

Prolog & SWI-Prolog Notes

Disclaimer: The notes below are fully/partially NOT created by myself. They are from slides and/or wikipedia and/or textbook. The purpose of this post is simply to learn and review for the course. If you think something is inappropriate, please co...…

MORE
EARLIER

Phonetics Notes

Notes for LIN228Disclaimer: The notes below are fully/partially NOT created by myself. They are from slides and/or wikipedia and/or textbook. The purpose of this post is simply to learn and review for the course. If you think something is inapprop...…

MORE