Пример #1
0
int main()
{
    Adjacency v;
    ID id;
    Map map(0);
    cin >> id;
    Feature * r1 = new MockFeature( id );
    r1->addToMap( &map );
    cin >> id;
    Feature * r2 = new MockFeature( id );
    r2->addToMap( &map );
    cin >> id;
    Feature * r3 = new MockFeature( id );
    r3->addToMap( &map );

    std::cout << "******* ADJACENCY TESTS ***********\n";
    std::cout << "Input and save test. Expected output same as last "
              << "line of input plus tag\n";
    v.input( std::cin, &map );
    v.save( std::cout );
    std::cout << '\n';

    std::cout << "\nPretty-printed output (should list only exits "
              << "that are valid above)\n";
    v.printDescription( std::cout );

    std::cout << "\nDirection checks: Should be similar to above\n";
    printExit( v, Direction("north") );
    printExit( v, Direction("east") );
    printExit( v, Direction("south") );
    printExit( v, Direction("west") );
    return 0;
}
Пример #2
0
void ExprSMTLIBLetPrinter::generateOutput() {
  if (p == NULL || query == NULL || o == NULL) {
    std::cerr << "Can't print SMTLIBv2. Output or query bad!" << std::endl;
    return;
  }

  generateBindings();

  if (isHumanReadable())
    printNotice();
  printOptions();
  printSetLogic();
  printArrayDeclarations();
  printLetExpression();
  printAction();
  printExit();
}
Пример #3
0
void ExprSMTLIBPrinter::generateOutput() {
  if (p == NULL || query == NULL || o == NULL) {
    std::cerr << "ExprSMTLIBPrinter::generateOutput() Can't print SMTLIBv2. "
                 "Output or query bad!" << std::endl;
    return;
  }

  if (humanReadable)
    printNotice();
  printOptions();
  printSetLogic();
  printArrayDeclarations();
  printConstraints();
  printQuery();
  printAction();
  printExit();
}