47 std::ostream
cout_{ std::cout.rdbuf() };
66 static std::string
strEscape(
const std::string & p_s );
160 bool getLine( std::string & p_line )
const;
165 get()->odo_changes_ += p_allchanges;
The context of execution.
Definition context.h:42
Design by contract interface class.
Definition dbc.h:26
Interpreter status.
Definition interpreter.h:36
bool getOdo() const
Getter for odo_.
Definition interpreter.h:135
static void addchanges(size_t p_allchanges)
Add p_allchanges to odo_changes_ counter.
Definition interpreter.h:164
Interpreter(const Interpreter &)=delete
Delete the copy ctor.
static auto get()
Get the singleton pointer.
Definition interpreter.h:101
virtual ~Interpreter()
Private dtor.
Definition interpreter.cpp:64
static void shutdown()
Shut down.
Definition interpreter.cpp:112
static void memory_statistics(bool p_force, std::ostream &p_cout)
Dumps memory statistical data.
Definition interpreter.cpp:240
Interpreter & operator=(Interpreter &&)=delete
Delete move assignement.
bool odo_
Interpreter Property.
Definition interpreter.h:46
bool getLine(std::string &p_line) const
Wrapper around getline to hide input stream.
Definition interpreter.cpp:105
void setContext(Context *p_c)
Setter for current context.
Definition interpreter.h:122
std::ostream cout_
Interpreter Property.
Definition interpreter.h:47
static Interpreter * instance_
Pointer to the singleton instance or a nullptr.
Definition interpreter.h:37
size_t odo_iterations_
Interpreter Property.
Definition interpreter.h:48
static Context * getContext()
Get the current context.
Definition interpreter.cpp:73
static std::string strEscape(const std::string &p_s)
Substitutes double backslashes by single backslashes and sequences backslash + 'n' by the ASCII CR co...
Definition interpreter.cpp:120
__int128 getClockStart() const
Getter for clock start.
Definition interpreter.cpp:81
void leonline(std::string &p_line, Context &k)
Processes one line of the leon-format input.
Definition interpreter.cpp:142
size_t maxopeelevel_
Interpreter Property.
Definition interpreter.h:49
std::ostream & getCout()
Getter for cout_.
Definition interpreter.h:147
Interpreter()
Private ctor.
Definition interpreter.cpp:58
Interpreter(Interpreter &&)=delete
Delete the move ctor.
size_t odo_changes_
Number of changes applied by odo.
Definition interpreter.h:43
PimplTime * pimpltime_
Pointer to implemenation of time functions - opaque pointer.
Definition interpreter.h:42
void commandline(int p_argc, char *p_argv[])
Command line parsing.
Definition interpreter.cpp:183
void snap()
Snapshot of complete Interpreter and Context statistics to Interpreter-cout.
Definition interpreter.cpp:259
size_t getOdoIterations() const
Getter for odo_iterations_.
Definition interpreter.h:139
void status_statistics()
Dumps various status statistical data.
Definition interpreter.cpp:217
void setOdo(bool p_odo)
Setter for odo_.
Definition interpreter.h:131
bool verbose_
Interpreter Property.
Definition interpreter.h:45
LineSource * linesource_
Read from cin or from file.
Definition interpreter.h:40
bool invariant() const noexcept override
Checks class invariants.
Definition interpreter.h:75
size_t getMaxopeelevel() const
Getter for maximum opee level.
Definition interpreter.h:143
bool getVerbose() const
Getter for verbose mode.
Definition interpreter.h:118
void help()
Command line help text.
Definition interpreter.cpp:86
Context * curctx_
Access to the current Context.
Definition interpreter.h:39
void property_statistics()
Dumps property statistical data.
Definition interpreter.cpp:230
Interpreter & operator=(const Interpreter &)=delete
Delete copy assignement.
Abstraction of input channel.
Definition linesource.h:35
Helpers for design by contract idioms.
#define DBC_POST(XXX)
Assert for postconditions.
Definition dbc.h:81
void panicExit()
Panic exit( EC_PANIC ).
Definition error.cpp:106
Miscellaneous definitions and functions.
Pointer to Implementation for Time.
Definition interpreter.cpp:52