Exemple #1
0
  /**
   * This function obtains from a list of Equality's objects the Equality object which is related
   * with an identifier of the specification. The Equality's objects are used for refine one
   * variable in the specification to more than one variable in the specification.
   *
   * @param implID The identifier of a variable in the implementation
   * @param equalities A list of Equality's objects
   * @return the related equality
   */
  public static Equality getAssociatedEquality(String implID, List<Equality> equalities) {
    for (int i = 0; i < equalities.size(); i++) {
      Equality equality = equalities.get(i);
      String plCode = equality.getPLCodeEquality();
      plCode = plCode.trim();
      plCode = plCode.substring(0, plCode.length() - 1);

      if (plCode.equals(implID)) return equality;
    }
    return null;
  }
Exemple #2
0
 public static void printRuleRefinement(RuleRefinement rule) {
   if (rule == null) {
     System.out.println("Rule NULL!!!");
   }
   System.out.println();
   System.out.println("Refinamiento");
   System.out.println("Los nombres de los identificadores son:");
   List<String> idsList = rule.getSpecIDs();
   for (int i = 0; i < idsList.size(); i++) {
     System.out.println("id: " + idsList.get(i));
   }
   // System.out.println("Nombre en Especificaión: " + rule.getSpecName()); CHANGE
   // System.out.println("Nombre en Implementación: " + rule.getRefName()); CHANGE
   // HACER ANALOGO AL ANTERIOR
   // System.out.print("Tipo: ");
   // printType(rule.getNodeType()); CHANGE
   // HACER ANALOGO ANTERIOR
 }