Skip to content

Commit 82093e9

Browse files
committed
make use of the logger some more and silence the "hops" (print!(".")).
1 parent 380f801 commit 82093e9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ mod solution;
1616
mod solver;
1717
mod strategy;
1818
use log::LevelFilter;
19+
use log::{debug, error, log_enabled, info, Level};
20+
1921

2022
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
2123
enum OutputFormat {
@@ -104,7 +106,7 @@ fn main() {
104106
let nfa = nfa::Nfa::load_from_file(&args.filename, &args.input_format, &args.state_ordering);
105107

106108
// print the input automaton
107-
println!("{}", nfa);
109+
info!("{}", nfa);
108110

109111
// compute the solution
110112
let solution = solver::solve(&nfa, &args.solver_output);

src/semigroup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl FlowSemigroup {
194194
let mut changed = false;
195195
while !to_process_mult.is_empty() {
196196
let flow = to_process_mult.pop_front().unwrap();
197-
print!(".");
197+
//print!(".");
198198
io::stdout().flush().unwrap();
199199
debug!("\nClose by product processing flow\n{}\n", flow);
200200
/*if Self::is_covered(&flow, &processed) {
@@ -250,7 +250,7 @@ impl FlowSemigroup {
250250
while !to_process_iter.is_empty() {
251251
let flow = to_process_iter.pop_front().unwrap();
252252
debug_assert!(flow.is_idempotent());
253-
print!(".");
253+
//print!(".");
254254
debug!("\nClose by product processing flow\n{}\n", flow);
255255
let iteration = flow.iteration();
256256
if !Self::is_covered(&iteration, &self.flows) {

src/strategy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl Strategy {
3838
) -> bool {
3939
let mut result = false;
4040
for (a, downset) in self.0.iter_mut() {
41-
print!(".");
41+
// print!(".");
4242
io::stdout().flush().unwrap();
4343
let edges = edges_per_letter.get(a).unwrap();
4444
let safe_pre_image = safe.safe_pre_image(edges, maximal_finite_value);

0 commit comments

Comments
 (0)