示例#1
0
文件: CLI.py 项目: Larch-Team/Larch
def do_load(session: engine.Session, filename: str):
    """Loads a saved proof 
    
    Arguments:
        - filename [str]
    """
    try:
        ret = session.load_proof(filename)
        for i in session.proof.nodes.getbranchnames():
            session.deal_closure(i)
        return ret
    except EngineError as e:
        return e
示例#2
0
文件: CLI.py 项目: Larch-Team/Larch
def do_contra(session: engine.Session, branch: str) -> str:
    """Detects contradictions and handles them by closing their branches"""
    cont = session.deal_closure(branch)
    if cont:
        return cont
    else:
        return f"No contradictions found on branch {branch}."