#include <iostream>

#include "CommandlineOptions.hh"
#include "Options.hh"

#include "ConfData.hh"
#include "Symmetry.hh"
#include "Chirotope.hh"

int main (const int argc, const char** argv) {
  using namespace topcom;

  CommandlineOptions::init(argc, argv);
  MessageStreams::forced() << std::endl;
  MessageStreams::forced() << "------------------------------------------------------------------\n";
  MessageStreams::forced() << " computing the chirotope of a point configuration \n";
  MessageStreams::forced() << " TOPCOM client: " << CommandlineOptions::client() << '\n';
  MessageStreams::forced() << "------------------------------------------------------------------\n";
  MessageStreams::forced() << std::endl;
  
  Options options(Options::PREPROCESS_CHIRO);
  ConfData confdata(options);
  confdata.read_input(std::cin);

  confdata.chiro().write_string(MessageStreams::result());
  MessageStreams::result() << std::endl;
  confdata.symmetries().write_sorted_generators(MessageStreams::result());
  MessageStreams::result() << std::endl;
  confdata.required_symmetries().write_sorted_generators(MessageStreams::result());
  if (confdata.has_seed()) {
    MessageStreams::result() << std::endl << confdata.seed() << std::endl;
  }
}

// eof points2chiro.cc
