UF uses expandDefinitions to convert fully applied HO_APPLY to APPLY_UF. The more appropriate place to do this is in Theory::ppRewrite.
d_true = NodeManager::currentNM()->mkConst(true);
}
-Node HoExtension::expandDefinition(Node node)
+Node HoExtension::ppRewrite(Node node)
{
// convert HO_APPLY to APPLY_UF if fully applied
if (node[0].getType().getNumChildren() == 2)
{
Trace("uf-ho") << "uf-ho : expanding definition : " << node << std::endl;
Node ret = getApplyUfForHoApply(node);
- Trace("uf-ho") << "uf-ho : expandDefinition : " << node << " to " << ret
+ Trace("uf-ho") << "uf-ho : ppRewrite : " << node << " to " << ret
<< std::endl;
return ret;
}
public:
HoExtension(TheoryState& state, TheoryInferenceManager& im);
- /** expand definition
+ /** ppRewrite
*
* This returns the expanded form of node.
*
* function variables for function heads that are not variables via the
* getApplyUfForHoApply method below.
*/
- Node expandDefinition(Node node);
+ Node ppRewrite(Node node);
/** check higher order
*
}
//--------------------------------- end standard check
-TrustNode TheoryUF::expandDefinition(Node node)
+TrustNode TheoryUF::ppRewrite(TNode node)
{
- Trace("uf-exp-def") << "TheoryUF::expandDefinition: expanding definition : "
- << node << std::endl;
+ Trace("uf-exp-def") << "TheoryUF::ppRewrite: expanding definition : " << node
+ << std::endl;
if( node.getKind()==kind::HO_APPLY ){
if( !options::ufHo() ){
std::stringstream ss;
ss << "Partial function applications are not supported in default mode, try --uf-ho.";
throw LogicException(ss.str());
}
- Node ret = d_ho->expandDefinition(node);
+ Node ret = d_ho->ppRewrite(node);
if (ret != node)
{
- Trace("uf-exp-def") << "TheoryUF::expandDefinition: higher-order: "
- << node << " to " << ret << std::endl;
+ Trace("uf-exp-def") << "TheoryUF::ppRewrite: higher-order: " << node
+ << " to " << ret << std::endl;
return TrustNode::mkTrustRewrite(node, ret, nullptr);
}
}
bool collectModelValues(TheoryModel* m,
const std::set<Node>& termSet) override;
- TrustNode expandDefinition(Node node) override;
+ TrustNode ppRewrite(TNode node) override;
void preRegisterTerm(TNode term) override;
TrustNode explain(TNode n) override;
-% COMMAND-LINE: --uf-ho
+% COMMAND-LINE: --uf-ho --ho-elim
% EXPECT: % SZS status Theorem for NUM925^1
%------------------------------------------------------------------------------
-; COMMAND-LINE: --uf-ho --no-check-unsat-cores --no-produce-models
+; COMMAND-LINE: --uf-ho --no-check-unsat-cores --no-produce-models --ho-elim
; EXPECT: unsat
(set-logic ALL)
-% COMMAND-LINE: --uf-ho
+% COMMAND-LINE: --uf-ho --ho-elim
% EXPECT: % SZS status Theorem for involved_parsing_ALG248^3
%------------------------------------------------------------------------------