Skip to content

Commit

Permalink
Fix typo in TextOutput::ResultStr enum.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenKaufmann committed Jun 11, 2024
1 parent 420d78d commit cc296ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions clasp/cli/clasp_output.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2009-2017 Benjamin Kaufmann
// Copyright (c) 2009-present Benjamin Kaufmann
//
// This file is part of Clasp. See http://www.cs.uni-potsdam.de/clasp/
//
Expand Down Expand Up @@ -180,7 +180,7 @@ class TextOutput : public Output, private StatsVisitor {
public:
//! Supported text formats.
enum Format { format_asp, format_aspcomp, format_sat09, format_pb09 };
enum ResultStr { res_unknonw = 0, res_sat = 1, res_unsat = 2, res_opt = 3, num_str };
enum ResultStr { res_unknown = 0, res_sat = 1, res_unsat = 2, res_opt = 3, num_str };
enum CategoryKey { cat_comment, cat_value, cat_objective, cat_result, cat_value_term, cat_atom_name, cat_atom_var, num_cat };

const char* result[num_str]; //!< Default result strings.
Expand Down
4 changes: 2 additions & 2 deletions src/clasp_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static inline std::string prettify(const std::string& str) {
return t;
}
TextOutput::TextOutput(uint32 verbosity, Format fmt, const char* catAtom, char ifs) : Output(verbosity), stTime_(0.0), state_(0) {
result[res_unknonw] = "UNKNOWN";
result[res_unknown] = "UNKNOWN";
result[res_sat] = "SATISFIABLE";
result[res_unsat] = "UNSATISFIABLE";
result[res_opt] = "OPTIMUM FOUND";
Expand Down Expand Up @@ -791,7 +791,7 @@ void TextOutput::printSummary(const ClaspFacade::Summary& run, bool final) {
if (final && callQ() != print_no){
comment(1, "%s\n", finalSep);
}
const char* res = result[res_unknonw];
const char* res = result[res_unknown];
if (run.unsat()) { res = result[res_unsat]; }
else if (run.sat()) { res = !run.optimum() ? result[res_sat] : result[res_opt]; }
if (std::strlen(res)) { printLN(cat_result, "%s", res); }
Expand Down

0 comments on commit cc296ac

Please sign in to comment.