ddlog
ddlog copied to clipboard
deadlock
Given a rule like
A(x text).
B(x text).
C(x text).
C(x) :- B(x).
A(x) :- C(x).
C(x) :- A(x).
I think the code currently deadlock. It is a separate discussion on whether we should allow recursion, but at least this should throw an error during compilation if we do not support it. @feiranwang
@netj : I don't think we need recursion right now, but I'd love to hear your opinion.
I think recursive rules are unnecessary complexity for the moment. We could start thinking about it when there's a compelling use case. But until then, we should detect cycles in the rules from the SemanticChecker and reject compiling such programs.
Will add check for this.