/**
   * Comprueba el valor de verdad del predicado.
   *
   * @return <code>true</code> si no existen llamadas al método en todo el modelo; <code>false
   *     </code>, en caso contrario.
   */
  @Override
  public boolean isValid() {

    Collection<ClassDef> allClasses = MOONRefactoring.getModel().getClassDefSourceAvailable();

    for (ClassDef nextClass : allClasses) {
      List<MethDec> modelMethods = nextClass.getMethDec();

      for (MethDec nextMethod : modelMethods) {
        MethodInstructionsCollector mic = new MethodInstructionsCollector(nextMethod);

        for (Instr instruction : mic.getCollection()) {

          if (instruction instanceof CallInstr) {
            if (!checkCallInstr((CallInstr) instruction)) return false;

          } else {
            if (instruction instanceof AssignmentInstr) {
              Expr expresion = ((AssignmentInstr) instruction).getRighSide();

              if (expresion instanceof CallExpr)
                if (!(checkCallExpr((CallExpr) expresion))) return false;
            }
          }
        }
      }
    }

    return true;
  }