def obtain_atomic_formulas(file):
propositions = set()
for line in file:
if line.startswith("("):
prop_char = set()
for char in line:
#print(str(char))
if(str(char).isalpha()):
prop_char.add(str(char))
for item in prop_char:
new = Symbol(item)
propositions.add(new)
return propositions #returns the set of propositions involved in the set of rules
# Parses each line of the rule file to create a a dictionary of rules, distinguishing the item, body and head. The key is the name of the rule
# while the value is the Rule object itself
preference_functions.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录