Commit a7f2a40d authored by Bharat Garhewal's avatar Bharat Garhewal
Browse files

Added some sleep time to HADS to prevent thread crashing

parent cccc7b2d
Pipeline #60223 failed with stages
in 3 minutes and 42 seconds
......@@ -14,7 +14,8 @@ use std::{
io::{BufRead, BufReader, Write},
process::{Child, Command, Stdio},
rc::Rc,
time::Instant,
thread,
time::{Duration, Instant},
};
/**
......@@ -77,6 +78,10 @@ where
}
fn find_counterexample(&mut self, hypothesis: &Mealy) -> CounterExample {
{
let sleepy = Duration::from_millis(100);
thread::sleep(sleepy);
}
let mut child = self.hads_process(None);
{
let write_config = MealyWriter::WriteConfigBuilder::default()
......@@ -202,6 +207,7 @@ where
{
fn hads_process(&self, lookahead_custom: Option<usize>) -> Child {
let h_ads_path = std::fs::canonicalize("./hybrid-ads/build/main").unwrap();
let random_infix_length = lookahead_custom.unwrap_or(self.lookahead);
Command::new(h_ads_path)
.args(&[
"-p",
......@@ -209,17 +215,11 @@ where
"-m",
"random",
"-k",
"10",
// &lookahead_custom
// .unwrap_or_else(|| self.lookahead.try_into().unwrap())
// .to_string(),
&random_infix_length.to_string(),
"-s",
"hads",
"-r",
&lookahead_custom
.unwrap_or_else(|| self.lookahead.try_into().unwrap())
.to_string(),
//"10",
&random_infix_length.to_string(),
"-x",
&self.seed.to_string(),
])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment