Also fixes a bug where patterns would be printed with the wrong scope (that included the bound variable list).
case kind::WITNESS:
{
out << smtKindString(k, d_variant) << " ";
+ toStream(out, n[0], toDepth, lbind);
+ out << " ";
if (n.getNumChildren() == 3)
{
out << "(! ";
}
- out << n[0] << " ";
toStreamWithLetify(out, n[1], toDepth - 1, lbind);
if (n.getNumChildren() == 3)
{
- out << n[2];
+ out << " ";
+ toStream(out, n[2], toDepth, lbind);
out << ")";
}
out << ")";
#include "theory/quantifiers/ematching/ho_trigger.h"
#include "theory/quantifiers/ematching/inst_match_generator.h"
#include "theory/quantifiers/instantiate.h"
+#include "theory/quantifiers/quantifiers_attributes.h"
#include "theory/quantifiers/term_database.h"
#include "theory/quantifiers/term_util.h"
#include "theory/quantifiers_engine.h"
: d_quantEngine(qe), d_quant(q)
{
d_nodes.insert( d_nodes.begin(), nodes.begin(), nodes.end() );
- Trace("trigger") << "Trigger for " << q << ": " << std::endl;
- for( unsigned i=0; i<d_nodes.size(); i++ ){
- Trace("trigger") << " " << d_nodes[i] << std::endl;
+ if (Trace.isOn("trigger"))
+ {
+ quantifiers::QuantAttributes* qa = d_quantEngine->getQuantAttributes();
+ Trace("trigger") << "Trigger for " << qa->quantToString(q) << ": "
+ << std::endl;
+ for (const Node& n : d_nodes)
+ {
+ Trace("trigger") << " " << n << std::endl;
+ }
}
if( d_nodes.size()==1 ){
if( isSimpleTrigger( d_nodes[0] ) ){
return Node::null();
}
+std::string QuantAttributes::quantToString(Node q) const
+{
+ std::stringstream ss;
+ Node name = getQuantName(q);
+ ss << (name.isNull() ? q : name);
+ return ss.str();
+}
+
int QuantAttributes::getQuantIdNum( Node q ) {
std::map< Node, QAttributes >::iterator it = d_qattr.find( q );
if( it!=d_qattr.end() ){
bool isInternal(Node q) const;
/** get quant name, which is used for :qid */
Node getQuantName(Node q) const;
+ /** Print quantified formula q, possibly using its name, if it has one */
+ std::string quantToString(Node q) const;
/** get (internal) quant id num */
int getQuantIdNum( Node q );
/** get (internal)quant id num */