preferences_core_functions.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Defeasible-Conditional-Deontic-Logic-Solver 作者: alabecki 项目源码 文件源码
def add_proposition(propositions, p):
    _p = p.strip()
    _p = re.sub(r'\s+', '', _p)
    _p = _p.replace("~", "")
    _p = _p.replace("&", ",")
    _p = _p.replace("|", ",")
    _p = _p.replace("(", "")
    _p = _p.replace(")", "")
    _p = _p.replace("->", ",")
    _p = _p.replace("!", "")
    new_props = _p.split(",")
    for prop in new_props:
        if prop == "":
            continue 
        new = Symbol(prop)
        propositions.add(new)

#Used to reconstruct worlds in light of any constraints that might be included in the file
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号