params->enabledcount = 1;
params->bound = 0;
params->maxfuturevalues = 0;
+ params->expireslop = 2;
}
static void print_usage(struct model_params *params) {
"-s Maximum actions that the model checker will wait for\n"
" a write from the future past the expected number of\n"
" actions. Default: %d\n"
+"-S Future value expiration sloppiness. Default: %u\n"
"-f Specify a fairness window in which actions that are\n"
" enabled sufficiently many times should receive\n"
" priority for execution. Default: %d\n"
"-e Enabled count. Default: %d\n"
"-b Upper length bound. Default: %d\n"
"-- Program arguments follow.\n\n",
-params->maxreads, params->maxfuturevalues, params->maxfuturedelay, params->fairwindow, params->enabledcount, params->bound);
+params->maxreads, params->maxfuturevalues, params->maxfuturedelay, params->expireslop, params->fairwindow, params->enabledcount, params->bound);
exit(EXIT_SUCCESS);
}
static void parse_options(struct model_params *params, int *argc, char ***argv) {
- const char *shortopts = "hm:M:s:f:e:b:";
+ const char *shortopts = "hm:M:s:S:f:e:b:";
int opt;
bool error = false;
while (!error && (opt = getopt(*argc, *argv, shortopts)) != -1) {
case 's':
params->maxfuturedelay = atoi(optarg);
break;
+ case 'S':
+ params->expireslop = atoi(optarg);
+ break;
case 'f':
params->fairwindow = atoi(optarg);
break;
/** @brief Maximum number of future values that can be sent to the same
* read */
int maxfuturevalues;
+
+ /** @brief Only generate a new future value/expiration pair if the
+ * expiration time exceeds the existing one by more than the slop
+ * value */
+ unsigned int expireslop;
};
struct PendingFutureValue {