MCPcopy
hub / github.com/google/mangle / checkAtomArity

Function checkAtomArity

analysis/validation.go:831–836  ·  view source on GitHub ↗
(atom ast.Atom)

Source from the content-addressed store, hash-verified

829}
830
831func checkAtomArity(atom ast.Atom) error {
832 if atom.Predicate.Arity != len(atom.Args) {
833 return fmt.Errorf("Arity mismatch: %s expects %d arguments but has %d in %v", atom.Predicate.Symbol, atom.Predicate.Arity, len(atom.Args), atom)
834 }
835 return nil
836}
837
838func (a *Analyzer) check(c func(sym ast.PredicateSym) error, clause ast.Clause) error {
839 for _, p := range clause.Premises {

Callers 1

CheckRuleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected