summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-11-23 11:49:59 -0600
committerGitHub <noreply@github.com>2020-11-23 11:49:59 -0600
commita6c001e078767a2de6f36a2fa1333b98e39a6ec8 (patch)
tree4d3685f39e6e2c0160a7bbcbfa0e07852721db8a /src/theory
parent2a5a65feac6ce270732f0a4d672e5838f5cd673a (diff)
Change UF ho to ppRewrite instead of expand definition (#5499)
UF uses expandDefinitions to convert fully applied HO_APPLY to APPLY_UF. The more appropriate place to do this is in Theory::ppRewrite.
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/uf/ho_extension.cpp4
-rw-r--r--src/theory/uf/ho_extension.h4
-rw-r--r--src/theory/uf/theory_uf.cpp12
-rw-r--r--src/theory/uf/theory_uf.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/theory/uf/ho_extension.cpp b/src/theory/uf/ho_extension.cpp
index d7de0a025..66bcbc76f 100644
--- a/src/theory/uf/ho_extension.cpp
+++ b/src/theory/uf/ho_extension.cpp
@@ -36,14 +36,14 @@ HoExtension::HoExtension(TheoryState& state, TheoryInferenceManager& im)
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;
}
diff --git a/src/theory/uf/ho_extension.h b/src/theory/uf/ho_extension.h
index fa9c5c612..0e82dbda6 100644
--- a/src/theory/uf/ho_extension.h
+++ b/src/theory/uf/ho_extension.h
@@ -54,7 +54,7 @@ class HoExtension
public:
HoExtension(TheoryState& state, TheoryInferenceManager& im);
- /** expand definition
+ /** ppRewrite
*
* This returns the expanded form of node.
*
@@ -63,7 +63,7 @@ class HoExtension
* 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
*
diff --git a/src/theory/uf/theory_uf.cpp b/src/theory/uf/theory_uf.cpp
index 099b56a33..6fdc969a4 100644
--- a/src/theory/uf/theory_uf.cpp
+++ b/src/theory/uf/theory_uf.cpp
@@ -204,21 +204,21 @@ void TheoryUF::notifyFact(TNode atom, bool pol, TNode fact, bool isInternal)
}
//--------------------------------- 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);
}
}
diff --git a/src/theory/uf/theory_uf.h b/src/theory/uf/theory_uf.h
index 4a63d9584..3f76919eb 100644
--- a/src/theory/uf/theory_uf.h
+++ b/src/theory/uf/theory_uf.h
@@ -142,7 +142,7 @@ private:
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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback