As discussed in https://github.com/viperproject/silicon/issues/847, we now allow domain axioms to refer to non-domain functions that don't have any preconditions. However, currently, decreases clauses may be parsed as preconditions, and thus Viper rejects axioms that refer to functions that have no real preconditions but do have a decreases clause.
This PR changes this behavior by ensuring that only preconditions with a requires-keyword are counted when checking if a function application inside an axiom is allowed. The reason we're checking for the presence of the requires-keyword and not the absence of a decreases-keyword or the presence of a decreases clause in the actual precondition expression is to avoid a dependency from Viper's type checker to the termination plugin.
As discussed in https://github.com/viperproject/silicon/issues/847, we now allow domain axioms to refer to non-domain functions that don't have any preconditions. However, currently, decreases clauses may be parsed as preconditions, and thus Viper rejects axioms that refer to functions that have no real preconditions but do have a decreases clause.
This PR changes this behavior by ensuring that only preconditions with a requires-keyword are counted when checking if a function application inside an axiom is allowed. The reason we're checking for the presence of the requires-keyword and not the absence of a decreases-keyword or the presence of a decreases clause in the actual precondition expression is to avoid a dependency from Viper's type checker to the termination plugin.