{
for (const Node& nc : n)
{
- if (nc.getKind() == kind::INST_ATTRIBUTE)
- {
- if (nc[0].getAttribute(theory::FunDefAttribute()))
- {
- out << ":fun-def";
- }
- }
- else if (nc.getKind() == kind::INST_PATTERN)
+ if (nc.getKind() == kind::INST_PATTERN)
{
out << ":pattern " << nc;
}
void QuantAttributes::setUserAttribute( const std::string& attr, Node n, std::vector< Node >& node_values, std::string str_value ){
Trace("quant-attr-debug") << "Set " << attr << " " << n << std::endl;
- if( attr=="axiom" ){
- Trace("quant-attr-debug") << "Set axiom " << n << std::endl;
- AxiomAttribute aa;
- n.setAttribute( aa, true );
- }else if( attr=="conjecture" ){
- Trace("quant-attr-debug") << "Set conjecture " << n << std::endl;
- ConjectureAttribute ca;
- n.setAttribute( ca, true );
- }else if( attr=="fun-def" ){
+ if (attr == "fun-def")
+ {
Trace("quant-attr-debug") << "Set function definition " << n << std::endl;
FunDefAttribute fda;
n.setAttribute( fda, true );
qa.d_hasPattern = true;
}else if( q[2][i].getKind()==INST_ATTRIBUTE ){
Node avar = q[2][i][0];
- if( avar.getAttribute(AxiomAttribute()) ){
- Trace("quant-attr") << "Attribute : axiom : " << q << std::endl;
- qa.d_axiom = true;
- }
- if( avar.getAttribute(ConjectureAttribute()) ){
- Trace("quant-attr") << "Attribute : conjecture : " << q << std::endl;
- qa.d_conjecture = true;
- }
if( avar.getAttribute(FunDefAttribute()) ){
Trace("quant-attr") << "Attribute : function definition : " << q << std::endl;
//get operator directly from pattern
}
}
-bool QuantAttributes::isConjecture( Node q ) {
- std::map< Node, QAttributes >::iterator it = d_qattr.find( q );
- if( it==d_qattr.end() ){
- return false;
- }else{
- return it->second.d_conjecture;
- }
-}
-
-bool QuantAttributes::isAxiom( Node q ) {
- std::map< Node, QAttributes >::iterator it = d_qattr.find( q );
- if( it==d_qattr.end() ){
- return false;
- }else{
- return it->second.d_axiom;
- }
-}
-
bool QuantAttributes::isFunDef( Node q ) {
std::map< Node, QAttributes >::iterator it = d_qattr.find( q );
if( it==d_qattr.end() ){
class QuantifiersEngine;
-/** Attribute true for quantifiers that are axioms */
-struct AxiomAttributeId {};
-typedef expr::Attribute< AxiomAttributeId, bool > AxiomAttribute;
-
-/** Attribute true for quantifiers that are conjecture */
-struct ConjectureAttributeId {};
-typedef expr::Attribute< ConjectureAttributeId, bool > ConjectureAttribute;
-
/** Attribute true for function definition quantifiers */
struct FunDefAttributeId {};
typedef expr::Attribute< FunDefAttributeId, bool > FunDefAttribute;
public:
QAttributes()
: d_hasPattern(false),
- d_conjecture(false),
- d_axiom(false),
d_sygus(false),
d_qinstLevel(-1),
d_quant_elim(false),
~QAttributes(){}
/** does the quantified formula have a pattern? */
bool d_hasPattern;
- /** is this formula marked a conjecture? */
- bool d_conjecture;
- /** is this formula marked an axiom? */
- bool d_axiom;
/** if non-null, this quantified formula is a function definition for function
* d_fundef_f */
Node d_fundef_f;
/** is quant elim annotation */
static bool checkQuantElimAnnotation( Node ipl );
- /** is conjecture */
- bool isConjecture( Node q );
- /** is axiom */
- bool isAxiom( Node q );
/** is function definition */
bool isFunDef( Node q );
/** is sygus conjecture */
TheoryQuantifiers::TheoryQuantifiers(Context* c, context::UserContext* u, OutputChannel& out, Valuation valuation, const LogicInfo& logicInfo) :
Theory(THEORY_QUANTIFIERS, c, u, out, valuation, logicInfo)
{
- out.handleUserAttribute( "axiom", this );
- out.handleUserAttribute( "conjecture", this );
out.handleUserAttribute( "fun-def", this );
out.handleUserAttribute( "sygus", this );
out.handleUserAttribute("quant-name", this);
out.handleUserAttribute("sygus-synth-grammar", this);
out.handleUserAttribute( "sygus-synth-fun-var-list", this );
out.handleUserAttribute( "quant-inst-max-level", this );
- out.handleUserAttribute( "rr-priority", this );
out.handleUserAttribute( "quant-elim", this );
out.handleUserAttribute( "quant-elim-partial", this );
}