44 std::ostream
cout_{ std::cout.rdbuf() };
63 static std::string
strEscape(
const std::string & p_s );
157 bool getLine( std::string & p_line )
const;
162 get()->odo_changes_ += p_allchanges;
The context of execution.
Definition: context.h:37
Design by contract interface class.
Definition: dbc.h:25
Interpreter status.
Definition: interpreter.h:33
bool getOdo() const
Getter for odo_.
Definition: interpreter.h:132
static void addchanges(size_t p_allchanges)
Add p_allchanges to odo_changes_ counter.
Definition: interpreter.h:161
Interpreter(const Interpreter &)=delete
Delete the copy ctor.
static auto get()
Get the singleton pointer.
Definition: interpreter.h:98
virtual ~Interpreter()
Private dtor.
Definition: interpreter.cpp:61
static void shutdown()
Shut down.
Definition: interpreter.cpp:109
static void memory_statistics(bool p_force, std::ostream &p_cout)
Dumps memory statistical data.
Definition: interpreter.cpp:237
Interpreter & operator=(Interpreter &&)=delete
Delete move assignement.
bool odo_
Interpreter Property.
Definition: interpreter.h:43
bool getLine(std::string &p_line) const
Wrapper around getline to hide input stream.
Definition: interpreter.cpp:102
void setContext(Context *p_c)
Setter for current context.
Definition: interpreter.h:119
std::ostream cout_
Interpreter Property.
Definition: interpreter.h:44
static Interpreter * instance_
Pointer to the singleton instance or a nullptr.
Definition: interpreter.h:34
size_t odo_iterations_
Interpreter Property.
Definition: interpreter.h:45
static Context * getContext()
Get the current context.
Definition: interpreter.cpp:70
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:117
__int128 getClockStart() const
Getter for clock start.
Definition: interpreter.cpp:78
void leonline(std::string &p_line, Context &k)
Processes one line of the leon-format input.
Definition: interpreter.cpp:139
size_t maxopeelevel_
Interpreter Property.
Definition: interpreter.h:46
std::ostream & getCout()
Getter for cout_.
Definition: interpreter.h:144
Interpreter()
Private ctor.
Definition: interpreter.cpp:55
Interpreter(Interpreter &&)=delete
Delete the move ctor.
size_t odo_changes_
Number of changes applied by odo.
Definition: interpreter.h:40
PimplTime * pimpltime_
Pointer to implemenation of time functions - opaque pointer.
Definition: interpreter.h:39
void commandline(int p_argc, char *p_argv[])
Command line parsing.
Definition: interpreter.cpp:180
void snap()
Snapshot of complete Interpreter and Context statistics to Interpreter-cout.
Definition: interpreter.cpp:256
size_t getOdoIterations() const
Getter for odo_iterations_.
Definition: interpreter.h:136
void status_statistics()
Dumps various status statistical data.
Definition: interpreter.cpp:214
void setOdo(bool p_odo)
Setter for odo_.
Definition: interpreter.h:128
bool verbose_
Interpreter Property.
Definition: interpreter.h:42
LineSource * linesource_
Read from cin or from file.
Definition: interpreter.h:37
bool invariant() const noexcept override
Checks class invariants.
Definition: interpreter.h:72
size_t getMaxopeelevel() const
Getter for maximum opee level.
Definition: interpreter.h:140
bool getVerbose() const
Getter for verbose mode.
Definition: interpreter.h:115
void help()
Command line help text.
Definition: interpreter.cpp:83
Context * curctx_
Access to the current Context.
Definition: interpreter.h:36
void property_statistics()
Dumps property statistical data.
Definition: interpreter.cpp:227
Interpreter & operator=(const Interpreter &)=delete
Delete copy assignement.
Abstraction of input channel.
Definition: linesource.h:29
Helpers for design by contract idioms.
#define DBC_POST(XXX)
Assert for postconditions.
Definition: dbc.h:80
void panicExit()
Panic exit( EC_PANIC ).
Definition: error.cpp:103
Miscellaneous definitions and functions.
Pointer to Implementation for Time.
Definition: interpreter.cpp:49