Skip to content

s09g/mini-prolog-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini-prolog

a mini prolog interpreter on python

I used backword chaining in this porgram.
It could save space in memory, but it took a longer time for sentance query compared with forward chaining.
However, for any knowledge base smaller than 10k sentances (rules and facts), it should complete in less than 10 seconds.


some datails

  • Achieved parsing and generated syntax tree by using Python Lex-Yacc module
  • converted rules and fact into conjunctive normal form
  • used an indexed-based knowledge base
  • used backward chaining for sentence query
  • avoided infinite loop in searching by implementing set of support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages