pattern matcher

时间:2014-03-30 06:16:52
【文件属性】:
文件名称:pattern matcher
文件大小:3KB
文件格式:RAR
更新时间:2014-03-30 06:16:52
Artificial intelligence, AI, Pattern mather, This is a pattern matcher in common lips. We implement the function match with two parameters: a pattern and a fact. It returns a list of variable-value bindings if the facts match the patterns while it gives nil if the match fails. The syntax for facts can be any valid structure in Lisp. Also, patterns can include, not predicates, less-than predicates, and greater-than predicates staring with =! <, >, respectively. Except for the variables and predicates, the atoms for the facts and the patterns should be the same. In addition, the facts should satisfy the conditions prescribed by variables and predicates. If the predicates appear in a pattern before the corresponding variables are bound, the match will fail. Finally, the same fact can match multiple patterns using & operators. However, we don’t allow nested &. In the test.txt file we can see more examples.
【文件预览】:
a.lisp
readme.lisp
test.lisp

网友评论