int main() { //test(); uint8_t x = lss_fresh_uint8(0); uint8_t y = lss_fresh_uint8(0); lss_write_cnf(exp_ref(x,y) != exp_opt(x,y), "tmp/exp.cnf"); return 0; }
void test() { uint8_t x = 0; uint8_t p = 0; do { do { if (exp_ref(x,p) != exp_opt(x,p)) { printf("Counterexample: %i %i", x, p); exit(1); } } while (++p != 0); } while (++x != 0); }
void StandardStateSystem::start(){ boost::mutex::scoped_lock lock(state_system_mutex); if (is_running) { return; } //E->setInt(taskMode_edit, RUNNING); // (*state_system_mode) = RUNNING; mprintf("Called start on state system"); // Make a copy of the experiment to ensure that it isn't destroyed before we're done with it shared_ptr<Experiment> current_experiment = GlobalCurrentExperiment; if (!current_experiment) { merror(M_STATE_SYSTEM_MESSAGE_DOMAIN, "Cannot start state system without a valid experiment defined"); return; } weak_ptr<State> exp_ref(current_experiment); current_experiment->setCurrentState(exp_ref); shared_ptr <StandardStateSystem> *shared_ptr_to_this_ptr = new shared_ptr<StandardStateSystem>(component_shared_from_this<StandardStateSystem>()); pthread_create(&state_system_thread, NULL, runStateSystem, shared_ptr_to_this_ptr); struct sched_param sp; memset(&sp, 0, sizeof(struct sched_param)); sp.sched_priority=STATE_SYSTEM_PRIORITY; pthread_setschedparam(state_system_thread, SCHED_RR, &sp); is_running = true; sendSystemStateEvent(); }