CBMC
solver_progress.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Solver Progress Reporting
4 
5 Author: Daniel Kroening, dkr@amazon.com
6 
7 \*******************************************************************/
8 
11 
12 #include "solver_progress.h"
13 
14 #include <util/console.h>
15 
16 #include <iostream>
17 
18 void solver_progresst::operator()(size_t current)
19 {
20  if(verbose)
21  {
22  if(current != 0)
23  std::cout << '\n';
24  std::cout << consolet::orange << "Processing property " << (current + 1)
25  << '/' << total << consolet::reset << '\n';
26  }
27  else
28  {
29  if(first)
30  {
31  first = false;
32  }
33  else
34  {
36  {
37  // up one row and clear the line
38  std::cout << consolet::cursorup << consolet::cleareol;
39  }
40  }
41 
42  std::cout << consolet::orange << "Processing property " << (current + 1)
43  << '/' << total << consolet::reset << '\n';
44  }
45 }
46 
48 {
49  if(verbose)
50  {
51  std::cout << '\n';
52  }
53  else
54  {
56  {
57  if(!first)
58  {
59  // up one row and clear the line
60  std::cout << consolet::cursorup << consolet::cleareol;
61  }
62  }
63  }
64 }
static std::ostream & cursorup(std::ostream &)
Definition: console.cpp:184
static std::ostream & reset(std::ostream &)
Definition: console.cpp:176
static bool is_terminal()
Definition: console.h:43
static std::ostream & orange(std::ostream &)
Definition: console.cpp:144
static std::ostream & cleareol(std::ostream &)
Definition: console.cpp:190
void operator()(std::size_t current)
std::size_t total
Console.
Solver Progress Reporting.