// Auto-detect input language by filename extension
std::string filenameStr("<stdin>");
if (!inputFromStdin) {
- // Use swap to avoid copying the string
- // TODO: use std::move() when switching to c++11
- filenameStr.swap(filenames[0]);
+ filenameStr = std::move(filenames[0]);
}
const char* filename = filenameStr.c_str();
}
InteractiveShell shell(pExecutor->getSolver(),
pExecutor->getSymbolManager());
- if (opts.driver.interactivePrompt)
+
+ CVC5Message() << Configuration::getPackageName() << " "
+ << Configuration::getVersionString();
+ if (Configuration::isGitBuild())
{
- CVC5Message() << Configuration::getPackageName() << " "
- << Configuration::getVersionString();
- if(Configuration::isGitBuild()) {
- CVC5Message() << " [" << Configuration::getGitId() << "]";
- }
- CVC5Message() << (Configuration::isDebugBuild() ? " DEBUG" : "")
- << " assertions:"
- << (Configuration::isAssertionBuild() ? "on" : "off")
- << endl
- << endl;
- CVC5Message() << Configuration::copyright() << endl;
+ CVC5Message() << " [" << Configuration::getGitId() << "]";
}
+ CVC5Message() << (Configuration::isDebugBuild() ? " DEBUG" : "")
+ << " assertions:"
+ << (Configuration::isAssertionBuild() ? "on" : "off")
+ << endl
+ << endl;
+ CVC5Message() << Configuration::copyright() << endl;
while(true) {
try {
if (d_usingEditline)
{
#if HAVE_LIBEDITLINE
- lineBuf = ::readline(d_options.driver.interactivePrompt
- ? (line == "" ? "cvc5> " : "... > ")
- : "");
+ lineBuf = ::readline(line == "" ? "cvc5> " : "... > ");
if(lineBuf != NULL && lineBuf[0] != '\0') {
::add_history(lineBuf);
}
}
else
{
- if (d_options.driver.interactivePrompt)
+ if (line == "")
{
- if(line == "") {
- d_out << "cvc5> " << flush;
- } else {
- d_out << "... > " << flush;
- }
+ d_out << "cvc5> " << flush;
+ }
+ else
+ {
+ d_out << "... > " << flush;
}
/* Read a line */
if (d_usingEditline)
{
#if HAVE_LIBEDITLINE
- lineBuf = ::readline(d_options.driver.interactivePrompt ? "... > "
- : "");
+ lineBuf = ::readline("... > ");
if(lineBuf != NULL && lineBuf[0] != '\0') {
::add_history(lineBuf);
}
}
else
{
- if (d_options.driver.interactivePrompt)
- {
- d_out << "... > " << flush;
- }
+ d_out << "... > " << flush;
/* Read a line */
stringbuf sb;
category = "regular"
long = "interactive"
type = "bool"
- help = "force interactive/non-interactive mode"
-
-[[option]]
- name = "interactivePrompt"
- category = "undocumented"
- long = "interactive-prompt"
- type = "bool"
- default = "true"
- help = "interactive prompting while in interactive mode"
+ help = "force interactive shell/non-interactive mode"
[[option]]
name = "segvSpin"