code: func extractEq(exprs ast.Body) (vars map[ast.Var][]ast.Ref, others []*ast.Expr) {
  	vars = map[ast.Var][]ast.Ref{}
  	for v := range exprs.Vars(ast.VarVisitorParams{}) {
  		vars[v] = nil
  	}
  
  	for _, expr := range exprs {
  		if !expr.IsEquality() {
  			others = append(others, expr)
  			continue
  		}
  
  		terms := expr.Terms.([]*ast.Term)
  		left, right := terms[1], terms[2]
  		if l, ok := left.Value.(ast.Var); ok {
  			if r, ok := right.Value.(ast.Ref); ok {
  				vars[l] = append(vars[l], r)
  				continue
  			}
  		} else if r, ok := right.Value.(ast.Var); ok {
  			if l, ok := left.Value.(ast.Ref); ok {
  				vars[r] = append(vars[r], l)
  				continue
  			}
  		}
  
  		others = append(others, expr)
  	}
  	return vars, others
  }
docs: // Extract the equality expressions from each rule, they contain
  // the potential split references. In order to be considered for
  // joining, an equality must have a variable on one side and a
  // reference on the other. Any other construct is thrown into
  // the others list to be resolved later.