Example #1
0
 /** Prints the state with number */
 public static void printState(TLCState currentState, int num) {
   MP.printState(
       EC.TLC_STATE_PRINT1,
       new String[] {String.valueOf(num), currentState.toString()},
       currentState,
       num);
 }
Example #2
0
 /**
  * Prints the state information if the TLC runs in print-diff-only mode and the last state is set,
  * it will print the diff only
  */
 public static void printState(TLCState currentState, TLCState lastState, int num) {
   String stateString;
   /* Added by rjoshi. */
   if (lastState != null && TLCGlobals.printDiffsOnly) {
     stateString = currentState.toString(lastState);
   } else {
     stateString = currentState.toString();
   }
   MP.printState(
       EC.TLC_STATE_PRINT1, new String[] {String.valueOf(num), stateString}, currentState, num);
 }
Example #3
0
  /**
   * Prints the state information if the TLC runs in print-diff-only mode and the last state is set,
   * it will print the diff only
   */
  public static void printState(TLCStateInfo currentStateInfo, TLCState lastState, int num) {
    String stateString;

    /* Added by rjoshi. */
    if (lastState != null && TLCGlobals.printDiffsOnly) {
      stateString = currentStateInfo.state.toString(lastState);
    } else {
      stateString = currentStateInfo.state.toString();
    }
    MP.printState(
        EC.TLC_STATE_PRINT2,
        new String[] {String.valueOf(num), currentStateInfo.info.toString(), stateString},
        currentStateInfo,
        num);
    OutputCollector.addStateToTrace(currentStateInfo);
  }
Example #4
0
 /** Reports that the state with a given number is stuttering */
 public static void printStutteringState(int num) {
   MP.printState(EC.TLC_STATE_PRINT3, new String[] {String.valueOf(num)}, (TLCState) null, num);
 }
Example #5
0
 /** Prints the state */
 public static void printState(TLCState currentState) {
   MP.printState(
       EC.TLC_STATE_PRINT1, new String[] {"", currentState.toString()}, currentState, -1);
 }
Example #6
0
 /**
  * Get a new model builder for given default parameters and hyper parameters.
  *
  * @param params default parameters
  * @param hypers A set of hyper parameter values
  * @return A ModelBuilder, blindly filled with parameters. Assumed to be cheap; used to check
  *     hyperparameter sanity
  */
 protected final ModelBuilder getBuilder(MP params, double[] hypers) {
   MP p = (MP) params.clone();
   p = applyHypers(p, hypers);
   ModelBuilder mb = createBuilder(p);
   return mb;
 }