From 6755552ebc536c27db2369002005b89fefef262d Mon Sep 17 00:00:00 2001 From: trevor_hansen Date: Sat, 14 Aug 2010 03:44:26 +0000 Subject: [PATCH] Improvement? FlattenKind now recursively flattens it's children. I was surprised that it didn't already do this. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@983 e59a4935-1847-0410-ae03-e826735625c1 --- src/AST/ASTmisc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AST/ASTmisc.cpp b/src/AST/ASTmisc.cpp index 3584b06..9520cfd 100644 --- a/src/AST/ASTmisc.cpp +++ b/src/AST/ASTmisc.cpp @@ -163,7 +163,6 @@ bool containsArrayOps(const ASTNode&n) // Flatten (k ... (k ci cj) ...) to (k ... ci cj ...) - // This is local to this file. ASTVec FlattenKind(Kind k, const ASTVec &children) { ASTVec flat_children; @@ -172,9 +171,10 @@ bool containsArrayOps(const ASTNode&n) for (ASTVec::const_iterator it = children.begin(); it != ch_end; it++) { Kind ck = it->GetKind(); - const ASTVec &gchildren = it->GetChildren(); if (k == ck) { + const ASTVec gchildren = FlattenKind(k,it->GetChildren()); + //const ASTVec gchildren = it->GetChildren(); // append grandchildren to children flat_children.insert(flat_children.end(), gchildren.begin(), gchildren.end()); -- 2.47.3