Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Mar 28, 2024
1 parent 669955b commit 088826a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/kind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ std::ostream& operator<<(std::ostream& o, Kind k)
// conversions
case Kind::EVAL_TO_INT: o << "EVAL_TO_INT"; break;
case Kind::EVAL_TO_RAT: o << "EVAL_TO_RAT"; break;
case Kind::EVAL_TO_BV: o << "EVAL_TO_BV"; break;
case Kind::EVAL_TO_BIN: o << "EVAL_TO_BIN"; break;
case Kind::EVAL_TO_STRING: o << "EVAL_TO_STRING"; break;
default: o << "UnknownKind(" << unsigned(k) << ")"; break;
}
Expand Down Expand Up @@ -139,7 +139,7 @@ std::string kindToTerm(Kind k)
// conversions
case Kind::EVAL_TO_INT: ss << "to_z";break;
case Kind::EVAL_TO_RAT: ss << "to_q";break;
case Kind::EVAL_TO_BV: ss << "to_bv";break;
case Kind::EVAL_TO_BIN: ss << "to_bin";break;
case Kind::EVAL_TO_STRING: ss << "to_str";break;
default:ss << "[" << k << "]";break;
}
Expand Down Expand Up @@ -217,7 +217,7 @@ bool isLiteralOp(Kind k)
// conversions
case Kind::EVAL_TO_INT:
case Kind::EVAL_TO_RAT:
case Kind::EVAL_TO_BV:
case Kind::EVAL_TO_BIN:
case Kind::EVAL_TO_STRING:return true; break;
default: break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/kind.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ enum class Kind
// conversions
EVAL_TO_INT,
EVAL_TO_RAT,
EVAL_TO_BV,
EVAL_TO_BIN,
EVAL_TO_STRING
};

Expand Down
4 changes: 2 additions & 2 deletions src/literal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Literal Literal::evaluate(Kind k, const std::vector<const Literal*>& args)
{
Assert (k!=Kind::EVAL_IS_EQ && k!=Kind::EVAL_IF_THEN_ELSE && k!=Kind::EVAL_REQUIRES);
Kind ka = Kind::NONE;
if (k!=Kind::EVAL_EXTRACT && k!=Kind::EVAL_TO_BV)
if (k!=Kind::EVAL_EXTRACT && k!=Kind::EVAL_TO_BIN)
{
ka = allSameKind(args);
if (ka==Kind::NONE)
Expand Down Expand Up @@ -413,7 +413,7 @@ Literal Literal::evaluate(Kind k, const std::vector<const Literal*>& args)
default: break;
}
break;
case Kind::EVAL_TO_BV:
case Kind::EVAL_TO_BIN:
if (args[0]->d_kind==Kind::NUMERAL && args[0]->d_int.fitsUnsignedInt())
{
uint32_t size = args[0]->d_int.toUnsignedInt();
Expand Down
2 changes: 1 addition & 1 deletion src/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ State::State(Options& opts, Stats& stats)
bindBuiltinEval("is_neg", Kind::EVAL_IS_NEG);
bindBuiltinEval("to_z", Kind::EVAL_TO_INT);
bindBuiltinEval("to_q", Kind::EVAL_TO_RAT);
bindBuiltinEval("to_bin", Kind::EVAL_TO_BV);
bindBuiltinEval("to_bin", Kind::EVAL_TO_BIN);
bindBuiltinEval("to_str", Kind::EVAL_TO_STRING);
// strings
bindBuiltinEval("len", Kind::EVAL_LENGTH);
Expand Down
2 changes: 1 addition & 1 deletion src/type_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ bool TypeChecker::checkArity(Kind k, size_t nargs, std::ostream* out)
case Kind::EVAL_INT_DIV:
case Kind::EVAL_INT_MOD:
case Kind::EVAL_RAT_DIV:
case Kind::EVAL_TO_BV:
case Kind::EVAL_TO_BIN:
case Kind::EVAL_FIND:
case Kind::EVAL_CONS:
ret = (nargs==2);
Expand Down

0 comments on commit 088826a

Please sign in to comment.