Skip to content

Commit

Permalink
fix type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanzwicknagl committed Apr 7, 2023
1 parent 28e31e5 commit bc4c9df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/viasp/asp/recursion.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def main(self):
def get_recursion_subgraph(facts: frozenset, supernode_symbols: frozenset,
transformation: Union[AST, str], conflict_free_h: str,
get_conflict_free_model: callable = lambda s: "model",
get_conflict_free_iterindex: callable = lambda s: "n") -> nx.DiGraph:
get_conflict_free_iterindex: callable = lambda s: "n") -> Union[bool, nx.DiGraph]:
"""
Get a recursion explanation for the given facts and the recursive transformation.
Generate graph from explanation, sorted by the iteration step number.
Expand All @@ -63,6 +63,7 @@ def get_recursion_subgraph(facts: frozenset, supernode_symbols: frozenset,
for i,rule in enumerate(transformation.rules):
tupleified = ",".join(list(map(str,rule.body)))
justification_head = f"{conflict_free_h}({i+1}, {rule.head}, ({tupleified}), {n_str})"
# TODO: get reasons by transformer
justification_body = ",".join(f"{model_str}({atom})" for atom in rule.body)
justification_body += f", not {model_str}({rule.head})"

Expand Down

0 comments on commit bc4c9df

Please sign in to comment.