Example #1
0
def test_fmt():
    root_expr = prob([v('z')], [do(v('x'))])
    assert fmt(root_expr) == 'pr(z|do(x))'
Example #2
0
def test_fmt():
    root_expr = prob([v("z")], [do(v("x"))])
    assert fmt(root_expr) == "pr(z|do(x))"
Example #3
0
def pleasantly_fmt(bindings, expr):
    new_labels = make_pleasant_variable_names(bindings)
    pleasant_expr = relabel_expr(new_labels, expr)
    return str(E.fmt(pleasant_expr))
Example #4
0
 def __str__(self):
     total_length = self.length + self.heuristic_length
     return '<ProofState L=%1.1f expr=%s>' % (total_length,
                                              fmt(self.root_expr))
Example #5
0
 def __str__(self):
     total_length = self.length + self.heuristic_length
     return '<ProofState L=%1.1f expr=%s>' % (total_length, fmt(self.root_expr))