1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Haniel Barbosa |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* Implementation of Alethe node conversion |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "proof/alethe/alethe_node_converter.h" |
17 |
|
|
18 |
|
#include "expr/node_algorithm.h" |
19 |
|
|
20 |
|
namespace cvc5 { |
21 |
|
namespace proof { |
22 |
|
|
23 |
|
AletheNodeConverter::AletheNodeConverter() {} |
24 |
|
|
25 |
|
Node AletheNodeConverter::postConvert(Node n) |
26 |
|
{ |
27 |
|
// whether node is a quantifier with attributes, in which case we remove it |
28 |
|
if (n.getKind() == kind::FORALL && n.getNumChildren() == 3) |
29 |
|
{ |
30 |
|
return NodeManager::currentNM()->mkNode(kind::FORALL, n[0], n[1]); |
31 |
|
} |
32 |
|
return n; |
33 |
|
} |
34 |
|
|
35 |
|
bool AletheNodeConverter::shouldTraverse(Node n) { return expr::hasClosure(n); } |
36 |
|
|
37 |
|
} // namespace proof |
38 |
29589 |
} // namespace cvc5 |