Skip to content

Commit

Permalink
Resolve higher-order evaluation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Jan 29, 2025
1 parent 7cdb9e4 commit 415e131
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ void ExprValue::computeFlags()
std::vector<ExprValue*>& children = cur->d_children;
if (children.empty())
{
bool isEval = (ck==Kind::PROGRAM_CONST || ck==Kind::ORACLE);
bool isNonGround = (ck==Kind::PARAM);
cur->setFlag(Flag::IS_EVAL, false);
cur->setFlag(Flag::IS_EVAL, isEval);
cur->setFlag(Flag::IS_NON_GROUND, isNonGround);
visit.pop_back();
}
Expand All @@ -86,16 +87,7 @@ void ExprValue::computeFlags()
else
{
visit.pop_back();
if (ck==Kind::APPLY)
{
Kind cck = children[0]->getKind();
if (cck==Kind::PROGRAM_CONST || cck==Kind::ORACLE)
{
cur->setFlag(Flag::IS_PROG_EVAL, true);
cur->setFlag(Flag::IS_EVAL, true);
}
}
else if (isLiteralOp(ck))
if (isLiteralOp(ck))
{
// requires type and literal operator kinds evaluate
cur->setFlag(Flag::IS_EVAL, true);
Expand Down

0 comments on commit 415e131

Please sign in to comment.