Egor Urvanov

Prolog

ภาษาและแพลตฟอร์ม · ภาษาโปรแกรมเชิงตรรกะ

Prolog คือภาษาที่โปรแกรมเป็นข้อเท็จจริงกับกฎการอนุมาน และเอนจินหาคำตอบของคำถามเอง. ข้อเท็จจริง: “การจอง b1 คือห้อง 2 ตั้งแต่ 10 ถึง 11” กฎ: “การจองสองรายการซ้อนทับกันถ้าห้องเดียวกันและเวลาซ้อนกัน” คำถาม: “การจองใดซ้อนทับกับ b1” สร้างขึ้นในปี 1972 ที่ฝรั่งเศส เขียนโปรแกรมใดก็ได้ใน Prolog รวมถึงโปรแกรมที่ไม่มีวันจบ ทฤษฎีบทของไรซ์จึงใช้กับมัน.

fact: booking b1: room 2, 10–11fact: booking b2: room 2, 10:30–12rule: overlap if same room and times overlapquestion: what overlaps b1?the engine searches?b2, or an endless searcha complete language: an endless loop can be written, Rice’s theorem applies● model, people, systems, data  ● agent and harness  ● risk, stop, boundaryFacts and a rule, a question: the engine finds the answer itself. The language is complete: the search may never finish

คำถามที่พบบ่อย

ภาษา Prolog คืออะไร

ภาษาที่โปรแกรมเป็นข้อเท็จจริงกับกฎการอนุมาน และเอนจินหาคำตอบของคำถามเอง.

Prolog ต่างจาก Datalog อย่างไร

Datalog คือ Prolog ที่ตัดทอนฟีเจอร์ที่ทำให้โปรแกรมรันไม่รู้จบ ทุกคำค้นของมันบนข้อมูลจำกัดจึงจบเสมอ.

แหล่งที่มา: Wikipedia: Prolog

คำศัพท์ที่เกี่ยวข้อง

อภิธานศัพท์ทั้งหมด

© 2026 Egor Urvanov