/* A Bison parser, made by GNU Bison 3.8.2.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
   Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output, and Bison version.  */
#define YYBISON 30802

/* Bison version string.  */
#define YYBISON_VERSION "3.8.2"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1

/* Substitute the type names.  */
#define YYSTYPE         SMTSTYPE
/* Substitute the variable and function names.  */
#define yyparse         smtparse
#define yylex           smtlex
#define yyerror         smterror
#define yydebug         smtdebug
#define yynerrs         smtnerrs
#define yylval          smtlval
#define yychar          smtchar

/* First part of user prologue.  */
#line 1 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"

  /********************************************************************
   * AUTHORS: Vijay Ganesh, Trevor Hansen
   *
   * BEGIN DATE: July, 2006
   *
   * This file is modified version of the CVCL's smtlib.y file. Please
   * see CVCL license below
  ********************************************************************/
  
  /********************************************************************
   *
   * \file smtlib.y
   * 
   * Author: Sergey Berezin, Clark Barrett
   * 
   * Created: Apr 30 2005
   *
   * <hr>
   * Copyright (C) 2004 by the Board of Trustees of Leland Stanford
   * Junior University and by New York University. 
   *
   * License to use, copy, modify, sell and/or distribute this software
   * and its documentation for any purpose is hereby granted without
   * royalty, subject to the terms and conditions defined in the \ref
   * LICENSE file provided with this distribution.  In particular:
   *
   * - The above copyright notice and this permission notice must appear
   * in all copies of the software and related documentation.
   *
   * - THE SOFTWARE IS PROVIDED "AS-IS", WITHOUT ANY WARRANTIES,
   * EXPRESSED OR IMPLIED.  USE IT AT YOUR OWN RISK.
   * 
   * <hr>
  ********************************************************************/

#include "stp/cpp_interface.h"
#include "stp/Parser/LetMgr.h"
#include "stp/Parser/parser.h"

  using namespace stp;
  using std::cout;
  using std::cerr;
  using std::endl;

  // Suppress the bogus warning suppression in bison (it generates
  // compile error)
#undef __GNUC_MINOR__
  
  extern char* smttext;
  extern int smtlineno;
  extern int smtlex(void);

  int yyerror(const char *s) {
    cout << "syntax error: line " << smtlineno << "\n" << s << endl;
    cout << "  token: " << smttext << endl;
    FatalError("");
    return 1;
  }
  int yyerror(void* /*AssertsQuery*/, const char* s) { return yyerror(s); }

  ASTNode query;
#define YYLTYPE_IS_TRIVIAL 1
#define YYMAXDEPTH 104857600
#define YYERROR_VERBOSE 1
#define YY_EXIT_FAILURE -1
  

#line 148 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"

# ifndef YY_CAST
#  ifdef __cplusplus
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
#  else
#   define YY_CAST(Type, Val) ((Type) (Val))
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
#  endif
# endif
# ifndef YY_NULLPTR
#  if defined __cplusplus
#   if 201103L <= __cplusplus
#    define YY_NULLPTR nullptr
#   else
#    define YY_NULLPTR 0
#   endif
#  else
#   define YY_NULLPTR ((void*)0)
#  endif
# endif

#include "parsesmt.tab.h"
/* Symbol kind.  */
enum yysymbol_kind_t
{
  YYSYMBOL_YYEMPTY = -2,
  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
  YYSYMBOL_YYerror = 1,                    /* error  */
  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
  YYSYMBOL_NUMERAL_TOK = 3,                /* NUMERAL_TOK  */
  YYSYMBOL_BVCONST_TOK = 4,                /* BVCONST_TOK  */
  YYSYMBOL_BITCONST_TOK = 5,               /* BITCONST_TOK  */
  YYSYMBOL_FORMID_TOK = 6,                 /* FORMID_TOK  */
  YYSYMBOL_TERMID_TOK = 7,                 /* TERMID_TOK  */
  YYSYMBOL_STRING_TOK = 8,                 /* STRING_TOK  */
  YYSYMBOL_USER_VAL_TOK = 9,               /* USER_VAL_TOK  */
  YYSYMBOL_SOURCE_TOK = 10,                /* SOURCE_TOK  */
  YYSYMBOL_CATEGORY_TOK = 11,              /* CATEGORY_TOK  */
  YYSYMBOL_DIFFICULTY_TOK = 12,            /* DIFFICULTY_TOK  */
  YYSYMBOL_BITVEC_TOK = 13,                /* BITVEC_TOK  */
  YYSYMBOL_ARRAY_TOK = 14,                 /* ARRAY_TOK  */
  YYSYMBOL_SELECT_TOK = 15,                /* SELECT_TOK  */
  YYSYMBOL_STORE_TOK = 16,                 /* STORE_TOK  */
  YYSYMBOL_TRUE_TOK = 17,                  /* TRUE_TOK  */
  YYSYMBOL_FALSE_TOK = 18,                 /* FALSE_TOK  */
  YYSYMBOL_NOT_TOK = 19,                   /* NOT_TOK  */
  YYSYMBOL_IMPLIES_TOK = 20,               /* IMPLIES_TOK  */
  YYSYMBOL_ITE_TOK = 21,                   /* ITE_TOK  */
  YYSYMBOL_AND_TOK = 22,                   /* AND_TOK  */
  YYSYMBOL_OR_TOK = 23,                    /* OR_TOK  */
  YYSYMBOL_XOR_TOK = 24,                   /* XOR_TOK  */
  YYSYMBOL_IFF_TOK = 25,                   /* IFF_TOK  */
  YYSYMBOL_EXISTS_TOK = 26,                /* EXISTS_TOK  */
  YYSYMBOL_FORALL_TOK = 27,                /* FORALL_TOK  */
  YYSYMBOL_LET_TOK = 28,                   /* LET_TOK  */
  YYSYMBOL_FLET_TOK = 29,                  /* FLET_TOK  */
  YYSYMBOL_NOTES_TOK = 30,                 /* NOTES_TOK  */
  YYSYMBOL_CVC_COMMAND_TOK = 31,           /* CVC_COMMAND_TOK  */
  YYSYMBOL_SORTS_TOK = 32,                 /* SORTS_TOK  */
  YYSYMBOL_FUNS_TOK = 33,                  /* FUNS_TOK  */
  YYSYMBOL_PREDS_TOK = 34,                 /* PREDS_TOK  */
  YYSYMBOL_EXTENSIONS_TOK = 35,            /* EXTENSIONS_TOK  */
  YYSYMBOL_DEFINITION_TOK = 36,            /* DEFINITION_TOK  */
  YYSYMBOL_AXIOMS_TOK = 37,                /* AXIOMS_TOK  */
  YYSYMBOL_LOGIC_TOK = 38,                 /* LOGIC_TOK  */
  YYSYMBOL_COLON_TOK = 39,                 /* COLON_TOK  */
  YYSYMBOL_LBRACKET_TOK = 40,              /* LBRACKET_TOK  */
  YYSYMBOL_RBRACKET_TOK = 41,              /* RBRACKET_TOK  */
  YYSYMBOL_LPAREN_TOK = 42,                /* LPAREN_TOK  */
  YYSYMBOL_RPAREN_TOK = 43,                /* RPAREN_TOK  */
  YYSYMBOL_SAT_TOK = 44,                   /* SAT_TOK  */
  YYSYMBOL_UNSAT_TOK = 45,                 /* UNSAT_TOK  */
  YYSYMBOL_UNKNOWN_TOK = 46,               /* UNKNOWN_TOK  */
  YYSYMBOL_ASSUMPTION_TOK = 47,            /* ASSUMPTION_TOK  */
  YYSYMBOL_FORMULA_TOK = 48,               /* FORMULA_TOK  */
  YYSYMBOL_STATUS_TOK = 49,                /* STATUS_TOK  */
  YYSYMBOL_BENCHMARK_TOK = 50,             /* BENCHMARK_TOK  */
  YYSYMBOL_EXTRASORTS_TOK = 51,            /* EXTRASORTS_TOK  */
  YYSYMBOL_EXTRAFUNS_TOK = 52,             /* EXTRAFUNS_TOK  */
  YYSYMBOL_EXTRAPREDS_TOK = 53,            /* EXTRAPREDS_TOK  */
  YYSYMBOL_LANGUAGE_TOK = 54,              /* LANGUAGE_TOK  */
  YYSYMBOL_DOLLAR_TOK = 55,                /* DOLLAR_TOK  */
  YYSYMBOL_QUESTION_TOK = 56,              /* QUESTION_TOK  */
  YYSYMBOL_DISTINCT_TOK = 57,              /* DISTINCT_TOK  */
  YYSYMBOL_SEMICOLON_TOK = 58,             /* SEMICOLON_TOK  */
  YYSYMBOL_EOF_TOK = 59,                   /* EOF_TOK  */
  YYSYMBOL_EQ_TOK = 60,                    /* EQ_TOK  */
  YYSYMBOL_NAND_TOK = 61,                  /* NAND_TOK  */
  YYSYMBOL_NOR_TOK = 62,                   /* NOR_TOK  */
  YYSYMBOL_NEQ_TOK = 63,                   /* NEQ_TOK  */
  YYSYMBOL_ASSIGN_TOK = 64,                /* ASSIGN_TOK  */
  YYSYMBOL_BV_TOK = 65,                    /* BV_TOK  */
  YYSYMBOL_BOOLEAN_TOK = 66,               /* BOOLEAN_TOK  */
  YYSYMBOL_BVLEFTSHIFT_1_TOK = 67,         /* BVLEFTSHIFT_1_TOK  */
  YYSYMBOL_BVRIGHTSHIFT_1_TOK = 68,        /* BVRIGHTSHIFT_1_TOK  */
  YYSYMBOL_BVARITHRIGHTSHIFT_TOK = 69,     /* BVARITHRIGHTSHIFT_TOK  */
  YYSYMBOL_BVPLUS_TOK = 70,                /* BVPLUS_TOK  */
  YYSYMBOL_BVSUB_TOK = 71,                 /* BVSUB_TOK  */
  YYSYMBOL_BVNOT_TOK = 72,                 /* BVNOT_TOK  */
  YYSYMBOL_BVMULT_TOK = 73,                /* BVMULT_TOK  */
  YYSYMBOL_BVDIV_TOK = 74,                 /* BVDIV_TOK  */
  YYSYMBOL_SBVDIV_TOK = 75,                /* SBVDIV_TOK  */
  YYSYMBOL_BVMOD_TOK = 76,                 /* BVMOD_TOK  */
  YYSYMBOL_SBVREM_TOK = 77,                /* SBVREM_TOK  */
  YYSYMBOL_SBVMOD_TOK = 78,                /* SBVMOD_TOK  */
  YYSYMBOL_BVNEG_TOK = 79,                 /* BVNEG_TOK  */
  YYSYMBOL_BVAND_TOK = 80,                 /* BVAND_TOK  */
  YYSYMBOL_BVOR_TOK = 81,                  /* BVOR_TOK  */
  YYSYMBOL_BVXOR_TOK = 82,                 /* BVXOR_TOK  */
  YYSYMBOL_BVNAND_TOK = 83,                /* BVNAND_TOK  */
  YYSYMBOL_BVNOR_TOK = 84,                 /* BVNOR_TOK  */
  YYSYMBOL_BVXNOR_TOK = 85,                /* BVXNOR_TOK  */
  YYSYMBOL_BVCONCAT_TOK = 86,              /* BVCONCAT_TOK  */
  YYSYMBOL_BVLT_TOK = 87,                  /* BVLT_TOK  */
  YYSYMBOL_BVGT_TOK = 88,                  /* BVGT_TOK  */
  YYSYMBOL_BVLE_TOK = 89,                  /* BVLE_TOK  */
  YYSYMBOL_BVGE_TOK = 90,                  /* BVGE_TOK  */
  YYSYMBOL_BVSLT_TOK = 91,                 /* BVSLT_TOK  */
  YYSYMBOL_BVSGT_TOK = 92,                 /* BVSGT_TOK  */
  YYSYMBOL_BVSLE_TOK = 93,                 /* BVSLE_TOK  */
  YYSYMBOL_BVSGE_TOK = 94,                 /* BVSGE_TOK  */
  YYSYMBOL_BVSX_TOK = 95,                  /* BVSX_TOK  */
  YYSYMBOL_BVZX_TOK = 96,                  /* BVZX_TOK  */
  YYSYMBOL_BVROTATE_RIGHT_TOK = 97,        /* BVROTATE_RIGHT_TOK  */
  YYSYMBOL_BVROTATE_LEFT_TOK = 98,         /* BVROTATE_LEFT_TOK  */
  YYSYMBOL_BVREPEAT_TOK = 99,              /* BVREPEAT_TOK  */
  YYSYMBOL_BVCOMP_TOK = 100,               /* BVCOMP_TOK  */
  YYSYMBOL_BOOLEXTRACT_TOK = 101,          /* BOOLEXTRACT_TOK  */
  YYSYMBOL_BOOL_TO_BV_TOK = 102,           /* BOOL_TO_BV_TOK  */
  YYSYMBOL_BVEXTRACT_TOK = 103,            /* BVEXTRACT_TOK  */
  YYSYMBOL_YYACCEPT = 104,                 /* $accept  */
  YYSYMBOL_cmd = 105,                      /* cmd  */
  YYSYMBOL_benchmark = 106,                /* benchmark  */
  YYSYMBOL_bench_name = 107,               /* bench_name  */
  YYSYMBOL_bench_attributes = 108,         /* bench_attributes  */
  YYSYMBOL_bench_attribute = 109,          /* bench_attribute  */
  YYSYMBOL_logic_name = 110,               /* logic_name  */
  YYSYMBOL_status = 111,                   /* status  */
  YYSYMBOL_annotation = 112,               /* annotation  */
  YYSYMBOL_user_value = 113,               /* user_value  */
  YYSYMBOL_attribute = 114,                /* attribute  */
  YYSYMBOL_sort_symbs = 115,               /* sort_symbs  */
  YYSYMBOL_var_decls = 116,                /* var_decls  */
  YYSYMBOL_var_decl = 117,                 /* var_decl  */
  YYSYMBOL_an_formulas = 118,              /* an_formulas  */
  YYSYMBOL_an_formula = 119,               /* an_formula  */
  YYSYMBOL_letexpr_mgmt = 120,             /* letexpr_mgmt  */
  YYSYMBOL_an_terms = 121,                 /* an_terms  */
  YYSYMBOL_an_term = 122,                  /* an_term  */
  YYSYMBOL_an_nonbvconst_term = 123,       /* an_nonbvconst_term  */
  YYSYMBOL_sort_symb = 124,                /* sort_symb  */
  YYSYMBOL_var = 125,                      /* var  */
  YYSYMBOL_fvar = 126                      /* fvar  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;




#ifdef short
# undef short
#endif

/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
   <limits.h> and (if available) <stdint.h> are included
   so that the code can choose integer types of a good width.  */

#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
#  define YY_STDINT_H
# endif
#endif

/* Narrow types that promote to a signed type and that can represent a
   signed or unsigned integer of at least N bits.  In tables they can
   save space and decrease cache pressure.  Promoting to a signed type
   helps avoid bugs in integer arithmetic.  */

#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif

/* Work around bug in HP-UX 11.23, which defines these macros
   incorrectly for preprocessor constants.  This workaround can likely
   be removed in 2023, as HPE has promised support for HP-UX 11.23
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif

#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif

#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif

#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
#  ifndef ptrdiff_t
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  endif
#  define YYPTRDIFF_T ptrdiff_t
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned
# endif
#endif

#define YYSIZE_MAXIMUM                                  \
  YY_CAST (YYPTRDIFF_T,                                 \
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
            ? YYPTRDIFF_MAXIMUM                         \
            : YY_CAST (YYSIZE_T, -1)))

#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))


/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
#  define YY_ATTRIBUTE_UNUSED
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YY_USE(E) ((void) (E))
#else
# define YY_USE(E) /* empty */
#endif

/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif

#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
    _Pragma ("GCC diagnostic push")                            \
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END            \
    _Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif


#define YY_ASSERT(E) ((void) (0 && (E)))

#if !defined yyoverflow

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
#     ifndef EXIT_SUCCESS
#      define EXIT_SUCCESS 0
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's 'empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* !defined yyoverflow */

#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined SMTSTYPE_IS_TRIVIAL && SMTSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yy_state_t yyss_alloc;
  YYSTYPE yyvs_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    do                                                                  \
      {                                                                 \
        YYPTRDIFF_T yynewbytes;                                         \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYPTRDIFF_T yyi;                      \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  5
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   431

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  104
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  23
/* YYNRULES -- Number of rules.  */
#define YYNRULES  101
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  271

/* YYMAXUTOK -- Last valid token kind.  */
#define YYMAXUTOK   358


/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, with out-of-bounds checking.  */
#define YYTRANSLATE(YYX)                                \
  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
   : YYSYMBOL_YYUNDEF)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_int8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103
};

#if SMTDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   213,   213,   239,   261,   267,   276,   288,   293,   304,
     308,   319,   323,   327,   334,   338,   345,   349,   353,   371,
     374,   380,   388,   391,   394,   398,   404,   415,   418,   425,
     435,   448,   457,   468,   474,   480,   484,   491,   518,   526,
     534,   542,   550,   558,   566,   574,   582,   586,   591,   597,
     604,   609,   614,   620,   626,   635,   651,   661,   670,   681,
     686,   691,   698,   699,   704,   708,   721,   735,   751,   759,
     767,   775,   783,   791,   799,   807,   826,   841,   849,   857,
     865,   874,   883,   892,   900,   908,   916,   924,   933,   942,
     951,   982,  1013,  1029,  1037,  1048,  1063,  1084,  1089,  1094,
    1101,  1105
};
#endif

/** Accessing symbol of state STATE.  */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])

#if SMTDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
   YYSYMBOL.  No bounds checking.  */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;

/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "\"end of file\"", "error", "\"invalid token\"", "NUMERAL_TOK",
  "BVCONST_TOK", "BITCONST_TOK", "FORMID_TOK", "TERMID_TOK", "STRING_TOK",
  "USER_VAL_TOK", "SOURCE_TOK", "CATEGORY_TOK", "DIFFICULTY_TOK",
  "BITVEC_TOK", "ARRAY_TOK", "SELECT_TOK", "STORE_TOK", "TRUE_TOK",
  "FALSE_TOK", "NOT_TOK", "IMPLIES_TOK", "ITE_TOK", "AND_TOK", "OR_TOK",
  "XOR_TOK", "IFF_TOK", "EXISTS_TOK", "FORALL_TOK", "LET_TOK", "FLET_TOK",
  "NOTES_TOK", "CVC_COMMAND_TOK", "SORTS_TOK", "FUNS_TOK", "PREDS_TOK",
  "EXTENSIONS_TOK", "DEFINITION_TOK", "AXIOMS_TOK", "LOGIC_TOK",
  "COLON_TOK", "LBRACKET_TOK", "RBRACKET_TOK", "LPAREN_TOK", "RPAREN_TOK",
  "SAT_TOK", "UNSAT_TOK", "UNKNOWN_TOK", "ASSUMPTION_TOK", "FORMULA_TOK",
  "STATUS_TOK", "BENCHMARK_TOK", "EXTRASORTS_TOK", "EXTRAFUNS_TOK",
  "EXTRAPREDS_TOK", "LANGUAGE_TOK", "DOLLAR_TOK", "QUESTION_TOK",
  "DISTINCT_TOK", "SEMICOLON_TOK", "EOF_TOK", "EQ_TOK", "NAND_TOK",
  "NOR_TOK", "NEQ_TOK", "ASSIGN_TOK", "BV_TOK", "BOOLEAN_TOK",
  "BVLEFTSHIFT_1_TOK", "BVRIGHTSHIFT_1_TOK", "BVARITHRIGHTSHIFT_TOK",
  "BVPLUS_TOK", "BVSUB_TOK", "BVNOT_TOK", "BVMULT_TOK", "BVDIV_TOK",
  "SBVDIV_TOK", "BVMOD_TOK", "SBVREM_TOK", "SBVMOD_TOK", "BVNEG_TOK",
  "BVAND_TOK", "BVOR_TOK", "BVXOR_TOK", "BVNAND_TOK", "BVNOR_TOK",
  "BVXNOR_TOK", "BVCONCAT_TOK", "BVLT_TOK", "BVGT_TOK", "BVLE_TOK",
  "BVGE_TOK", "BVSLT_TOK", "BVSGT_TOK", "BVSLE_TOK", "BVSGE_TOK",
  "BVSX_TOK", "BVZX_TOK", "BVROTATE_RIGHT_TOK", "BVROTATE_LEFT_TOK",
  "BVREPEAT_TOK", "BVCOMP_TOK", "BOOLEXTRACT_TOK", "BOOL_TO_BV_TOK",
  "BVEXTRACT_TOK", "$accept", "cmd", "benchmark", "bench_name",
  "bench_attributes", "bench_attribute", "logic_name", "status",
  "annotation", "user_value", "attribute", "sort_symbs", "var_decls",
  "var_decl", "an_formulas", "an_formula", "letexpr_mgmt", "an_terms",
  "an_term", "an_nonbvconst_term", "sort_symb", "var", "fvar", YY_NULLPTR
};

static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
  return yytname[yysymbol];
}
#endif

#define YYPACT_NINF (-81)

#define yypact_value_is_default(Yyn) \
  ((Yyn) == YYPACT_NINF)

#define YYTABLE_NINF (-1)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
     -16,   -23,    28,   -81,    21,   -81,   -81,    -9,   248,   -28,
     -81,   -81,    24,   -81,   -81,   -81,    27,   197,   197,   -27,
       0,    14,   -81,   -81,   -81,   -81,    17,   -81,   -81,   -81,
     -81,   337,    52,   -81,   197,   -81,   -81,   -81,   -81,   -81,
     -81,    18,    18,    56,   197,   197,   197,   197,   197,   197,
     197,    20,    22,   250,   250,   250,   250,   250,   250,   250,
     250,   250,   250,    23,   -81,    33,    57,   -22,   -81,   -20,
      36,    35,   197,   197,    80,   -81,   127,   197,   197,    25,
      29,    39,   -81,   -81,   -81,   250,   250,   197,   250,    73,
     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
     250,   250,   250,   250,   250,   250,   250,   250,   250,   250,
      42,    43,    45,    47,    48,   250,    49,   150,   -81,   -81,
     -81,   250,   250,   250,   250,   250,   250,   250,   250,   250,
     -81,   -81,    -4,   -81,   -81,   -81,   -81,   -81,    50,   197,
     -81,   -81,   -81,    61,    68,    82,    83,    89,   250,   250,
     250,    76,   -81,   250,   250,   250,   250,   250,   -81,   250,
     250,   250,   250,   250,   250,   -81,   250,   250,   250,   250,
     250,   250,   250,   122,   123,   124,   125,   126,   250,   128,
     -81,   -81,    87,    93,    95,    96,    97,    98,    99,   100,
     115,    92,   119,   -81,   117,    11,   -81,   118,   -81,   -81,
     250,   197,   121,   -81,   250,   250,   -81,   -81,   -81,   -81,
     -81,   -81,   -81,   -81,   -81,   -81,   -81,   -81,   -81,   -81,
     -81,   -81,   -81,   131,   132,   133,   137,   142,   -81,   129,
     -81,   -81,   -81,   -81,   -81,   -81,   -81,   -81,   -81,   160,
     161,   -81,   -81,   -81,   141,   143,   -81,   -81,   -81,   250,
     250,   250,   250,   250,   164,   144,   148,   -81,   -81,   -81,
     -81,   -81,   -81,   -81,   147,   -81,   186,   250,   153,   -81,
     -81
};

/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
   Performed when YYTABLE does not specify something else to do.  Zero
   means the default is an error.  */
static const yytype_int8 yydefact[] =
{
       0,     0,     0,     2,     0,     1,     4,     0,     0,     0,
       5,    13,    19,    22,    23,    24,     0,     0,     0,     0,
       0,     0,     3,     6,    21,    20,    15,    10,   101,    33,
      34,     0,     0,     7,     0,    35,     8,    16,    17,    18,
       9,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   100,     0,     0,     0,    27,     0,
       0,     0,     0,     0,     0,    31,     0,     0,     0,     0,
       0,    59,    62,    97,    98,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    57,    61,
      63,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      46,    54,     0,    11,    28,    12,    14,    47,     0,     0,
      50,    32,    51,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    99,     0,     0,     0,    78,     0,    70,    79,
       0,     0,     0,     0,     0,    71,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      37,    58,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,    30,     0,    25,    48,     0,    52,    53,
       0,     0,     0,    65,     0,     0,    64,    87,    88,    89,
      77,    80,    82,    81,    83,    84,    72,    73,    74,    85,
      86,    75,    69,     0,     0,     0,     0,     0,    76,     0,
      36,    42,    44,    43,    45,    38,    40,    39,    41,     0,
       0,    29,    26,    49,     0,     0,    60,    66,    68,     0,
       0,     0,     0,     0,     0,     0,     0,    55,    56,    93,
      94,    91,    90,    92,     0,    95,     0,     0,     0,    67,
      96
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
     -81,   -81,   -81,   -81,   -81,   182,   -81,   -81,   -81,   -81,
     -81,   -81,   158,   -55,   154,   103,   -81,   -80,   -54,   -81,
       6,   -81,   -81
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_uint8 yydefgoto[] =
{
       0,     2,     3,     7,     9,    10,    27,    40,    11,    25,
      12,   194,    67,    68,    74,    75,    34,   117,   118,   119,
     195,   120,    35
};

/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule whose
   number is the opposite.  If YYTABLE_NINF, syntax error.  */
static const yytype_int16 yytable[] =
{
     121,   122,   123,   124,   125,   126,   127,   128,   129,   191,
     192,     8,   134,   156,   134,    22,   159,    37,    38,    39,
      66,   133,    66,   135,   191,   192,     1,     4,     5,     6,
       8,   148,   149,    24,   151,    26,   153,   154,   155,   193,
     157,   158,    41,   160,   161,   162,   163,   164,   165,   166,
     167,   168,   169,   170,   171,   172,    42,    43,    64,    70,
      66,   178,    79,   181,    80,   132,   130,   182,   183,   184,
     185,   186,   187,   188,   189,   190,   131,   136,   137,   147,
     152,   145,   173,   174,   146,   175,    28,   176,   177,   179,
     200,   201,   202,   196,   203,   204,   205,    29,    30,   207,
     208,   209,   181,   210,   198,   181,   211,   212,   213,   214,
     215,   199,   216,   217,   218,   219,   220,   221,   222,   206,
      33,    36,    31,   140,   228,   223,   224,   225,   226,   227,
     230,   229,   239,    28,    63,    32,   231,    65,   232,   233,
     234,   235,   236,   237,    29,    30,   244,    71,    72,    73,
     247,   248,    77,    78,    81,    82,    83,    84,   238,   240,
     241,   243,   246,   255,   256,    85,    86,   264,   254,    31,
     142,    87,   249,   250,   251,   138,   139,   141,   252,   141,
     143,   144,    32,   253,   257,   265,   258,   266,   267,   268,
     150,    23,    88,   180,   270,   259,   260,   261,   262,   263,
      69,   242,    76,    28,     0,     0,    89,     0,     0,     0,
       0,     0,     0,   269,    29,    30,     0,    90,    91,    92,
      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
     103,   104,   105,   106,   107,   108,   109,     0,     0,    31,
       0,     0,   197,     0,     0,   110,   111,   112,   113,   114,
     115,     0,    32,   116,    81,    82,    83,    84,    13,    14,
      15,     0,     0,     0,     0,    85,    86,     0,     0,     0,
       0,    87,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    16,     0,     0,     0,
       0,     0,    88,     0,     0,    17,    18,    19,     0,     0,
      20,    21,     0,     0,   245,     0,    89,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    90,    91,    92,
      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
     103,   104,   105,   106,   107,   108,   109,     0,     0,     0,
       0,     0,     0,    28,     0,   110,   111,   112,   113,   114,
     115,     0,     0,   116,    29,    30,    44,    45,    46,    47,
      48,    49,    50,     0,     0,    51,    52,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,    31,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    32,     0,    53,     0,     0,    54,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,    55,    56,    57,    58,    59,    60,
      61,    62
};

static const yytype_int16 yycheck[] =
{
      54,    55,    56,    57,    58,    59,    60,    61,    62,    13,
      14,    39,    67,    93,    69,    43,    96,    44,    45,    46,
      42,    43,    42,    43,    13,    14,    42,    50,     0,     8,
      39,    85,    86,     9,    88,     8,    90,    91,    92,    43,
      94,    95,    42,    97,    98,    99,   100,   101,   102,   103,
     104,   105,   106,   107,   108,   109,    42,    40,     6,     3,
      42,   115,    42,   117,    42,     8,    43,   121,   122,   123,
     124,   125,   126,   127,   128,   129,    43,    41,    43,    40,
       7,    56,    40,    40,    55,    40,     6,    40,    40,    40,
       8,     8,     3,    43,   148,   149,   150,    17,    18,   153,
     154,   155,   156,   157,    43,   159,   160,   161,   162,   163,
     164,    43,   166,   167,   168,   169,   170,   171,   172,    43,
      17,    18,    42,    43,   178,     3,     3,     3,     3,     3,
      43,     3,    40,     6,    31,    55,    43,    34,    43,    43,
      43,    43,    43,    43,    17,    18,   200,    44,    45,    46,
     204,   205,    49,    50,     4,     5,     6,     7,    43,    40,
      43,    43,    41,     3,     3,    15,    16,     3,    39,    42,
      43,    21,    41,    41,    41,    72,    73,    74,    41,    76,
      77,    78,    55,    41,    43,    41,    43,    39,    41,     3,
      87,     9,    42,    43,    41,   249,   250,   251,   252,   253,
      42,   195,    48,     6,    -1,    -1,    56,    -1,    -1,    -1,
      -1,    -1,    -1,   267,    17,    18,    -1,    67,    68,    69,
      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
      80,    81,    82,    83,    84,    85,    86,    -1,    -1,    42,
      -1,    -1,   139,    -1,    -1,    95,    96,    97,    98,    99,
     100,    -1,    55,   103,     4,     5,     6,     7,    10,    11,
      12,    -1,    -1,    -1,    -1,    15,    16,    -1,    -1,    -1,
      -1,    21,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,    -1,    -1,
      -1,    -1,    42,    -1,    -1,    47,    48,    49,    -1,    -1,
      52,    53,    -1,    -1,   201,    -1,    56,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    67,    68,    69,
      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
      80,    81,    82,    83,    84,    85,    86,    -1,    -1,    -1,
      -1,    -1,    -1,     6,    -1,    95,    96,    97,    98,    99,
     100,    -1,    -1,   103,    17,    18,    19,    20,    21,    22,
      23,    24,    25,    -1,    -1,    28,    29,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    42,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    55,    -1,    57,    -1,    -1,    60,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    87,    88,    89,    90,    91,    92,
      93,    94
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_int8 yystos[] =
{
       0,    42,   105,   106,    50,     0,     8,   107,    39,   108,
     109,   112,   114,    10,    11,    12,    38,    47,    48,    49,
      52,    53,    43,   109,     9,   113,     8,   110,     6,    17,
      18,    42,    55,   119,   120,   126,   119,    44,    45,    46,
     111,    42,    42,    40,    19,    20,    21,    22,    23,    24,
      25,    28,    29,    57,    60,    87,    88,    89,    90,    91,
      92,    93,    94,   119,     6,   119,    42,   116,   117,   116,
       3,   119,   119,   119,   118,   119,   118,   119,   119,    42,
      42,     4,     5,     6,     7,    15,    16,    21,    42,    56,
      67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
      95,    96,    97,    98,    99,   100,   103,   121,   122,   123,
     125,   122,   122,   122,   122,   122,   122,   122,   122,   122,
      43,    43,     8,    43,   117,    43,    41,    43,   119,   119,
      43,   119,    43,   119,   119,    56,    55,    40,   122,   122,
     119,   122,     7,   122,   122,   122,   121,   122,   122,   121,
     122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
     122,   122,   122,    40,    40,    40,    40,    40,   122,    40,
      43,   122,   122,   122,   122,   122,   122,   122,   122,   122,
     122,    13,    14,    43,   115,   124,    43,   119,    43,    43,
       8,     8,     3,   122,   122,   122,    43,   122,   122,   122,
     122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
     122,   122,   122,     3,     3,     3,     3,     3,   122,     3,
      43,    43,    43,    43,    43,    43,    43,    43,    43,    40,
      40,    43,   124,    43,   122,   119,    41,   122,   122,    41,
      41,    41,    41,    41,    39,     3,     3,    43,    43,   122,
     122,   122,   122,   122,     3,    41,    39,    41,     3,   122,
      41
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr1[] =
{
       0,   104,   105,   106,   107,   108,   108,   109,   109,   109,
     109,   109,   109,   109,   110,   110,   111,   111,   111,   112,
     112,   113,   114,   114,   114,   115,   115,   116,   116,   117,
     117,   118,   118,   119,   119,   119,   119,   119,   119,   119,
     119,   119,   119,   119,   119,   119,   119,   119,   119,   119,
     119,   119,   119,   119,   119,   120,   120,   121,   121,   122,
     122,   122,   123,   123,   123,   123,   123,   123,   123,   123,
     123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
     123,   123,   123,   123,   123,   123,   123,   123,   123,   123,
     123,   123,   123,   123,   123,   124,   124,   125,   125,   125,
     126,   126
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     1,     5,     1,     1,     2,     3,     3,     3,
       3,     5,     5,     1,     4,     1,     1,     1,     1,     1,
       2,     1,     2,     2,     2,     1,     2,     1,     2,     4,
       3,     1,     2,     1,     1,     1,     5,     4,     5,     5,
       5,     5,     5,     5,     5,     5,     3,     4,     5,     6,
       4,     4,     5,     5,     3,     7,     7,     1,     2,     1,
       4,     1,     1,     1,     3,     3,     4,     7,     4,     3,
       2,     2,     3,     3,     3,     3,     3,     3,     2,     2,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       5,     5,     5,     5,     5,     4,     6,     1,     1,     2,
       2,     1
};


enum { YYENOMEM = -2 };

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = SMTEMPTY)

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYNOMEM         goto yyexhaustedlab


#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                    \
  do                                                              \
    if (yychar == SMTEMPTY)                                        \
      {                                                           \
        yychar = (Token);                                         \
        yylval = (Value);                                         \
        YYPOPSTACK (yylen);                                       \
        yystate = *yyssp;                                         \
        goto yybackup;                                            \
      }                                                           \
    else                                                          \
      {                                                           \
        yyerror (AssertsQuery, YY_("syntax error: cannot back up")); \
        YYERROR;                                                  \
      }                                                           \
  while (0)

/* Backward compatibility with an undocumented macro.
   Use SMTerror or SMTUNDEF. */
#define YYERRCODE SMTUNDEF


/* Enable debugging if requested.  */
#if SMTDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)




# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Kind, Value, AssertsQuery); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*-----------------------------------.
| Print this symbol's value on YYO.  |
`-----------------------------------*/

static void
yy_symbol_value_print (FILE *yyo,
                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, void* AssertsQuery)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  YY_USE (AssertsQuery);
  if (!yyvaluep)
    return;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/*---------------------------.
| Print this symbol on YYO.  |
`---------------------------*/

static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, void* AssertsQuery)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  yy_symbol_value_print (yyo, yykind, yyvaluep, AssertsQuery);
  YYFPRINTF (yyo, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

static void
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
                 int yyrule, void* AssertsQuery)
{
  int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
                       &yyvsp[(yyi + 1) - (yynrhs)], AssertsQuery);
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, Rule, AssertsQuery); \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !SMTDEBUG */
# define YYDPRINTF(Args) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !SMTDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif






/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
yydestruct (const char *yymsg,
            yysymbol_kind_t yykind, YYSTYPE *yyvaluep, void* AssertsQuery)
{
  YY_USE (yyvaluep);
  YY_USE (AssertsQuery);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/* Lookahead token kind.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Number of syntax errors so far.  */
int yynerrs;




/*----------.
| yyparse.  |
`----------*/

int
yyparse (void* AssertsQuery)
{
    yy_state_fast_t yystate = 0;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus = 0;

    /* Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* Their size.  */
    YYPTRDIFF_T yystacksize = YYINITDEPTH;

    /* The state stack: array, bottom, top.  */
    yy_state_t yyssa[YYINITDEPTH];
    yy_state_t *yyss = yyssa;
    yy_state_t *yyssp = yyss;

    /* The semantic value stack: array, bottom, top.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs = yyvsa;
    YYSTYPE *yyvsp = yyvs;

  int yyn;
  /* The return value of yyparse.  */
  int yyresult;
  /* Lookahead symbol kind.  */
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;



#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yychar = SMTEMPTY; /* Cause a token to be read.  */

  goto yysetstate;


/*------------------------------------------------------------.
| yynewstate -- push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;


/*--------------------------------------------------------------------.
| yysetstate -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  YY_IGNORE_USELESS_CAST_BEGIN
  *yyssp = YY_CAST (yy_state_t, yystate);
  YY_IGNORE_USELESS_CAST_END
  YY_STACK_PRINT (yyss, yyssp);

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    YYNOMEM;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

# if defined yyoverflow
      {
        /* Give user a chance to reallocate the stack.  Use copies of
           these so that the &'s don't force the real ones into
           memory.  */
        yy_state_t *yyss1 = yyss;
        YYSTYPE *yyvs1 = yyvs;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow (YY_("memory exhausted"),
                    &yyss1, yysize * YYSIZEOF (*yyssp),
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        YYNOMEM;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yy_state_t *yyss1 = yyss;
        union yyalloc *yyptr =
          YY_CAST (union yyalloc *,
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
        if (! yyptr)
          YYNOMEM;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YY_IGNORE_USELESS_CAST_BEGIN
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
                  YY_CAST (long, yystacksize)));
      YY_IGNORE_USELESS_CAST_END

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */


  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;


/*-----------.
| yybackup.  |
`-----------*/
yybackup:
  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
  if (yychar == SMTEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yylex ();
    }

  if (yychar <= SMTEOF)
    {
      yychar = SMTEOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == SMTerror)
    {
      /* The scanner already issued an error message, process directly
         to error recovery.  But do not keep the error token as
         lookahead, it is too special and may lead us to an endless
         loop in error recovery. */
      yychar = SMTUNDEF;
      yytoken = YYSYMBOL_YYerror;
      goto yyerrlab1;
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yytable_value_is_error (yyn))
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  /* Discard the shifted token.  */
  yychar = SMTEMPTY;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     '$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 2: /* cmd: benchmark  */
#line 214 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode assumptions;
  if((yyvsp[0].node) == NULL) 
    {
      assumptions = GlobalParserInterface->CreateNode(TRUE);
    } 
  else 
    {
      assumptions = *(yyvsp[0].node);
    }
      
  if(query.IsNull()) 
    {
      query = GlobalParserInterface->CreateNode(FALSE);
    }

  ((ASTVec*)AssertsQuery)->push_back(assumptions);
  ((ASTVec*)AssertsQuery)->push_back(query);
  delete (yyvsp[0].node);
  query = ASTNode();
  YYACCEPT;
}
#line 1506 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 3: /* benchmark: LPAREN_TOK BENCHMARK_TOK bench_name bench_attributes RPAREN_TOK  */
#line 240 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  if((yyvsp[-1].vec) != NULL){
    if((yyvsp[-1].vec)->size() > 1) 
      (yyval.node) = new ASTNode(GlobalParserInterface->CreateNode(AND,*(yyvsp[-1].vec)));
    else if((yyvsp[-1].vec)->size() ==1)
      (yyval.node) = new ASTNode((*(yyvsp[-1].vec))[0]);
     else
      (yyval.node) = new ASTNode(GlobalParserInterface->CreateNode(TRUE));     
    delete (yyvsp[-1].vec);
  }
  else {
    (yyval.node) = NULL;
  }
  delete (yyvsp[-2].str); //discard the benchmarkname.
}
#line 1526 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 4: /* bench_name: STRING_TOK  */
#line 262 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
}
#line 1533 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 5: /* bench_attributes: bench_attribute  */
#line 268 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.vec) = new ASTVec;
  if ((yyvsp[0].node) != NULL) {
    (yyval.vec)->push_back(*(yyvsp[0].node));
    GlobalParserInterface->AddAssert(*(yyvsp[0].node));
    delete (yyvsp[0].node);
  }
}
#line 1546 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 6: /* bench_attributes: bench_attributes bench_attribute  */
#line 277 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  if ((yyvsp[-1].vec) != NULL && (yyvsp[0].node) != NULL) {
    (yyvsp[-1].vec)->push_back(*(yyvsp[0].node));
    GlobalParserInterface->AddAssert(*(yyvsp[0].node));
    (yyval.vec) = (yyvsp[-1].vec);
    delete (yyvsp[0].node);
  }
}
#line 1559 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 7: /* bench_attribute: COLON_TOK ASSUMPTION_TOK an_formula  */
#line 289 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //assumptions are like asserts
  (yyval.node) = (yyvsp[0].node);
}
#line 1568 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 8: /* bench_attribute: COLON_TOK FORMULA_TOK an_formula  */
#line 294 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  // Previously this would call AddQuery() on the negation.
  // But if multiple formula were (eroneously) present
  // it discarded all but the last formula. Allowing multiple 
  // formula and taking the conjunction of them along with all
  // the assumptions is what the other solvers do.  

  //assumptions are like asserts
  (yyval.node) = (yyvsp[0].node);
}
#line 1583 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 9: /* bench_attribute: COLON_TOK STATUS_TOK status  */
#line 305 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = NULL;
}
#line 1591 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 10: /* bench_attribute: COLON_TOK LOGIC_TOK logic_name  */
#line 309 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  if (!(0 == strcmp((yyvsp[0].str)->c_str(),"QF_UFBV")  ||
        0 == strcmp((yyvsp[0].str)->c_str(),"QF_BV") ||
        //0 == strcmp($3->c_str(),"QF_UF") ||
        0 == strcmp((yyvsp[0].str)->c_str(),"QF_AUFBV"))) {
    yyerror("Wrong input logic:");
  }
  delete (yyvsp[0].str);
  (yyval.node) = NULL;
}
#line 1606 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 11: /* bench_attribute: COLON_TOK EXTRAFUNS_TOK LPAREN_TOK var_decls RPAREN_TOK  */
#line 320 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = NULL;
}
#line 1614 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 12: /* bench_attribute: COLON_TOK EXTRAPREDS_TOK LPAREN_TOK var_decls RPAREN_TOK  */
#line 324 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = NULL;
}
#line 1622 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 13: /* bench_attribute: annotation  */
#line 328 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = NULL;
}
#line 1630 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 14: /* logic_name: STRING_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK  */
#line 335 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.str) = (yyvsp[-3].str);
}
#line 1638 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 15: /* logic_name: STRING_TOK  */
#line 339 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.str) = (yyvsp[0].str);
}
#line 1646 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 16: /* status: SAT_TOK  */
#line 345 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
        { 
  input_status = TO_BE_SATISFIABLE; 
  (yyval.node) = NULL; 
}
#line 1655 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 17: /* status: UNSAT_TOK  */
#line 349 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
            { 
  input_status = TO_BE_UNSATISFIABLE; 
  (yyval.node) = NULL; 
  }
#line 1664 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 18: /* status: UNKNOWN_TOK  */
#line 354 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{ 
  input_status = TO_BE_UNKNOWN; 
  (yyval.node) = NULL; 
}
#line 1673 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 19: /* annotation: attribute  */
#line 372 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
}
#line 1680 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 20: /* annotation: attribute user_value  */
#line 375 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
}
#line 1687 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 21: /* user_value: USER_VAL_TOK  */
#line 381 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //cerr << "Printing user_value: " << *$1 << endl;
  delete (yyvsp[0].str);
}
#line 1696 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 22: /* attribute: COLON_TOK SOURCE_TOK  */
#line 389 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
}
#line 1703 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 23: /* attribute: COLON_TOK CATEGORY_TOK  */
#line 392 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
}
#line 1710 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 25: /* sort_symbs: sort_symb  */
#line 399 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //a single sort symbol here means either a BitVec or a Boolean
  (yyval.indexvaluewidth).indexwidth = (yyvsp[0].indexvaluewidth).indexwidth;
  (yyval.indexvaluewidth).valuewidth = (yyvsp[0].indexvaluewidth).valuewidth;
}
#line 1720 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 26: /* sort_symbs: sort_symb sort_symb  */
#line 405 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //two sort symbols mean f: type --> type
  (yyval.indexvaluewidth).indexwidth = (yyvsp[-1].indexvaluewidth).valuewidth;
  (yyval.indexvaluewidth).valuewidth = (yyvsp[0].indexvaluewidth).valuewidth;
}
#line 1730 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 27: /* var_decls: var_decl  */
#line 416 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{}
#line 1736 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 28: /* var_decls: var_decls var_decl  */
#line 419 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{}
#line 1742 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 29: /* var_decl: LPAREN_TOK STRING_TOK sort_symbs RPAREN_TOK  */
#line 426 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode s = stp::GlobalParserInterface->LookupOrCreateSymbol((yyvsp[-2].str)->c_str());
  //Sort_symbs has the indexwidth/valuewidth. Set those fields in
  //var
  s.SetIndexWidth((yyvsp[-1].indexvaluewidth).indexwidth);
  s.SetValueWidth((yyvsp[-1].indexvaluewidth).valuewidth);
  GlobalParserInterface->addSymbol(s);
  delete (yyvsp[-2].str);
}
#line 1756 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 30: /* var_decl: LPAREN_TOK STRING_TOK RPAREN_TOK  */
#line 436 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode s = stp::GlobalParserInterface->LookupOrCreateSymbol((yyvsp[-1].str)->c_str());
  s.SetIndexWidth(0);
  s.SetValueWidth(0);
  GlobalParserInterface->addSymbol(s);
  //Sort_symbs has the indexwidth/valuewidth. Set those fields in
  //var
  delete (yyvsp[-1].str);
}
#line 1770 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 31: /* an_formulas: an_formula  */
#line 449 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.vec) = new ASTVec;
  if ((yyvsp[0].node) != NULL) {
    (yyval.vec)->push_back(*(yyvsp[0].node));
    delete (yyvsp[0].node);
  }
}
#line 1782 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 32: /* an_formulas: an_formulas an_formula  */
#line 458 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  if ((yyvsp[-1].vec) != NULL && (yyvsp[0].node) != NULL) {
    (yyvsp[-1].vec)->push_back(*(yyvsp[0].node));
    (yyval.vec) = (yyvsp[-1].vec);
    delete (yyvsp[0].node);
  }
}
#line 1794 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 33: /* an_formula: TRUE_TOK  */
#line 469 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->CreateNode(TRUE)); 
  assert(0 == (yyval.node)->GetIndexWidth()); 
  assert(0 == (yyval.node)->GetValueWidth());
}
#line 1804 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 34: /* an_formula: FALSE_TOK  */
#line 475 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->CreateNode(FALSE)); 
  assert(0 == (yyval.node)->GetIndexWidth()); 
  assert(0 == (yyval.node)->GetValueWidth());
}
#line 1814 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 35: /* an_formula: fvar  */
#line 481 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = (yyvsp[0].node);
}
#line 1822 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 36: /* an_formula: LPAREN_TOK EQ_TOK an_term an_term RPAREN_TOK  */
#line 485 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = new ASTNode(GlobalParserInterface->CreateNode(EQ,*(yyvsp[-2].node), *(yyvsp[-1].node)));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1833 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 37: /* an_formula: LPAREN_TOK DISTINCT_TOK an_terms RPAREN_TOK  */
#line 492 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  using namespace stp;

  ASTVec terms = *(yyvsp[-1].vec);
  ASTVec forms;

  for(ASTVec::const_iterator it=terms.begin(),itend=terms.end();
      it!=itend; it++) {
    for(ASTVec::const_iterator it2=it+1; it2!=itend; it2++) {
      ASTNode n = (GlobalParserInterface->nf->CreateNode(NOT, GlobalParserInterface->CreateNode(EQ, *it, *it2)));

          
      forms.push_back(n); 
    }
  }

  if(forms.size() == 0) 
    FatalError("empty distinct");
 
  (yyval.node) = (forms.size() == 1) ?
    new ASTNode(forms[0]) :
    new ASTNode(GlobalParserInterface->CreateNode(AND, forms));

  delete (yyvsp[-1].vec);
}
#line 1863 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 38: /* an_formula: LPAREN_TOK BVSLT_TOK an_term an_term RPAREN_TOK  */
#line 520 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVSLT, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1874 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 39: /* an_formula: LPAREN_TOK BVSLE_TOK an_term an_term RPAREN_TOK  */
#line 528 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVSLE, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1885 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 40: /* an_formula: LPAREN_TOK BVSGT_TOK an_term an_term RPAREN_TOK  */
#line 536 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVSGT, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1896 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 41: /* an_formula: LPAREN_TOK BVSGE_TOK an_term an_term RPAREN_TOK  */
#line 544 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVSGE, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1907 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 42: /* an_formula: LPAREN_TOK BVLT_TOK an_term an_term RPAREN_TOK  */
#line 552 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVLT, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1918 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 43: /* an_formula: LPAREN_TOK BVLE_TOK an_term an_term RPAREN_TOK  */
#line 560 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVLE, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1929 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 44: /* an_formula: LPAREN_TOK BVGT_TOK an_term an_term RPAREN_TOK  */
#line 568 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVGT, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1940 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 45: /* an_formula: LPAREN_TOK BVGE_TOK an_term an_term RPAREN_TOK  */
#line 576 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  ASTNode * n = GlobalParserInterface->newNode(BVGE, *(yyvsp[-2].node), *(yyvsp[-1].node));
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);      
}
#line 1951 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 46: /* an_formula: LPAREN_TOK an_formula RPAREN_TOK  */
#line 583 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = (yyvsp[-1].node);
}
#line 1959 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 47: /* an_formula: LPAREN_TOK NOT_TOK an_formula RPAREN_TOK  */
#line 587 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->nf->CreateNode(NOT, *(yyvsp[-1].node)));
  delete (yyvsp[-1].node);
}
#line 1968 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 48: /* an_formula: LPAREN_TOK IMPLIES_TOK an_formula an_formula RPAREN_TOK  */
#line 592 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = GlobalParserInterface->newNode(IMPLIES, *(yyvsp[-2].node), *(yyvsp[-1].node));
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);
}
#line 1978 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 49: /* an_formula: LPAREN_TOK ITE_TOK an_formula an_formula an_formula RPAREN_TOK  */
#line 598 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->nf->CreateNode(ITE, *(yyvsp[-3].node), *(yyvsp[-2].node), *(yyvsp[-1].node)));
  delete (yyvsp[-3].node);
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);
}
#line 1989 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 50: /* an_formula: LPAREN_TOK AND_TOK an_formulas RPAREN_TOK  */
#line 605 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->CreateNode(AND, *(yyvsp[-1].vec)));
  delete (yyvsp[-1].vec);
}
#line 1998 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 51: /* an_formula: LPAREN_TOK OR_TOK an_formulas RPAREN_TOK  */
#line 610 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->CreateNode(OR, *(yyvsp[-1].vec)));
  delete (yyvsp[-1].vec);
}
#line 2007 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 52: /* an_formula: LPAREN_TOK XOR_TOK an_formula an_formula RPAREN_TOK  */
#line 615 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = GlobalParserInterface->newNode(XOR, *(yyvsp[-2].node), *(yyvsp[-1].node));
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);
}
#line 2017 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 53: /* an_formula: LPAREN_TOK IFF_TOK an_formula an_formula RPAREN_TOK  */
#line 621 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = GlobalParserInterface->newNode(IFF, *(yyvsp[-2].node), *(yyvsp[-1].node));
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);
}
#line 2027 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 54: /* an_formula: letexpr_mgmt an_formula RPAREN_TOK  */
#line 628 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = (yyvsp[-1].node);
  GlobalParserInterface->letMgr->CleanupLetIDMap();                      
}
#line 2036 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 55: /* letexpr_mgmt: LPAREN_TOK LET_TOK LPAREN_TOK QUESTION_TOK STRING_TOK an_term RPAREN_TOK  */
#line 636 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //populate the hashtable from LET-var -->
  //LET-exprs and then process them:
  //
  //1. ensure that LET variables do not clash
  //1. with declared variables.
  //
  //2. Ensure that LET variables are not
  //2. defined more than once
  GlobalParserInterface->letMgr->LetExprMgr(*(yyvsp[-2].str),*(yyvsp[-1].node));
  GlobalParserInterface->letMgr->commit();

  delete (yyvsp[-2].str);
  delete (yyvsp[-1].node);      
}
#line 2056 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 56: /* letexpr_mgmt: LPAREN_TOK FLET_TOK LPAREN_TOK DOLLAR_TOK STRING_TOK an_formula RPAREN_TOK  */
#line 652 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //Do LET-expr management
  GlobalParserInterface->letMgr->LetExprMgr(*(yyvsp[-2].str),*(yyvsp[-1].node));
  GlobalParserInterface->letMgr->commit();
  delete (yyvsp[-2].str);
  delete (yyvsp[-1].node);     
}
#line 2068 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 57: /* an_terms: an_term  */
#line 662 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.vec) = new ASTVec;
  if ((yyvsp[0].node) != NULL) {
    (yyval.vec)->push_back(*(yyvsp[0].node));
    delete (yyvsp[0].node);
  }
}
#line 2080 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 58: /* an_terms: an_terms an_term  */
#line 671 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  if ((yyvsp[-1].vec) != NULL && (yyvsp[0].node) != NULL) {
    (yyvsp[-1].vec)->push_back(*(yyvsp[0].node));
    (yyval.vec) = (yyvsp[-1].vec);
    delete (yyvsp[0].node);
  }
}
#line 2092 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 59: /* an_term: BVCONST_TOK  */
#line 682 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->CreateBVConst(*(yyvsp[0].str), 10, 32));
  delete (yyvsp[0].str);
}
#line 2101 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 60: /* an_term: BVCONST_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK  */
#line 687 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode(GlobalParserInterface->CreateBVConst(*(yyvsp[-3].str),10,(yyvsp[-1].uintval)));
  delete (yyvsp[-3].str);
}
#line 2110 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 61: /* an_term: an_nonbvconst_term  */
#line 692 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
(yyval.node) = (yyvsp[0].node);
}
#line 2118 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 62: /* an_nonbvconst_term: BITCONST_TOK  */
#line 698 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
             { (yyval.node) = (yyvsp[0].node); }
#line 2124 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 63: /* an_nonbvconst_term: var  */
#line 700 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode((*(yyvsp[0].node)));
  delete (yyvsp[0].node);
}
#line 2133 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 64: /* an_nonbvconst_term: LPAREN_TOK an_term RPAREN_TOK  */
#line 705 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = (yyvsp[-1].node);
}
#line 2141 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 65: /* an_nonbvconst_term: SELECT_TOK an_term an_term  */
#line 709 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //ARRAY READ
  // valuewidth is same as array, indexwidth is 0.
  ASTNode array = *(yyvsp[-1].node);
  ASTNode index = *(yyvsp[0].node);
  unsigned int width = array.GetValueWidth();
  ASTNode * n = 
    new ASTNode(GlobalParserInterface->nf->CreateTerm(READ, width, array, index));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2158 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 66: /* an_nonbvconst_term: STORE_TOK an_term an_term an_term  */
#line 722 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //ARRAY WRITE
  unsigned int width = (yyvsp[0].node)->GetValueWidth();
  ASTNode array = *(yyvsp[-2].node);
  ASTNode index = *(yyvsp[-1].node);
  ASTNode writeval = *(yyvsp[0].node);
  ASTNode write_term = GlobalParserInterface->nf->CreateArrayTerm(WRITE,(yyvsp[-2].node)->GetIndexWidth(),width,array,index,writeval);
  ASTNode * n = new ASTNode(write_term);
  (yyval.node) = n;
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2176 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 67: /* an_nonbvconst_term: BVEXTRACT_TOK LBRACKET_TOK NUMERAL_TOK COLON_TOK NUMERAL_TOK RBRACKET_TOK an_term  */
#line 736 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  int width = (yyvsp[-4].uintval) - (yyvsp[-2].uintval) + 1;
  if (width < 0)
    yyerror("Negative width in extract");
      
  if((unsigned)(yyvsp[-4].uintval) >= (yyvsp[0].node)->GetValueWidth())
    yyerror("Parsing: Wrong width in BVEXTRACT\n");                      
      
  ASTNode hi  =  GlobalParserInterface->CreateBVConst(32, (yyvsp[-4].uintval));
  ASTNode low =  GlobalParserInterface->CreateBVConst(32, (yyvsp[-2].uintval));
  ASTNode output = GlobalParserInterface->nf->CreateTerm(BVEXTRACT, width, *(yyvsp[0].node),hi,low);
  ASTNode * n = new ASTNode(output);
  (yyval.node) = n;
  delete (yyvsp[0].node);
}
#line 2196 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 68: /* an_nonbvconst_term: ITE_TOK an_formula an_term an_term  */
#line 752 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  const unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  (yyval.node) = new ASTNode(GlobalParserInterface->nf->CreateArrayTerm(ITE,(yyvsp[0].node)->GetIndexWidth(), width,*(yyvsp[-2].node), *(yyvsp[-1].node), *(yyvsp[0].node)));      
  delete (yyvsp[-2].node);
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2208 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 69: /* an_nonbvconst_term: BVCONCAT_TOK an_term an_term  */
#line 760 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  const unsigned int width = (yyvsp[-1].node)->GetValueWidth() + (yyvsp[0].node)->GetValueWidth();
  ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(BVCONCAT, width, *(yyvsp[-1].node), *(yyvsp[0].node)));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2220 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 70: /* an_nonbvconst_term: BVNOT_TOK an_term  */
#line 768 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //this is the BVNOT (term) in the CVCL language
  unsigned int width = (yyvsp[0].node)->GetValueWidth();
  ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(BVNOT, width, *(yyvsp[0].node)));
  (yyval.node) = n;
  delete (yyvsp[0].node);
}
#line 2232 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 71: /* an_nonbvconst_term: BVNEG_TOK an_term  */
#line 776 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  //this is the BVUMINUS term in CVCL langauge
  unsigned width = (yyvsp[0].node)->GetValueWidth();
  ASTNode * n =  new ASTNode(GlobalParserInterface->nf->CreateTerm(BVUMINUS,width,*(yyvsp[0].node)));
  (yyval.node) = n;
  delete (yyvsp[0].node);
}
#line 2244 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 72: /* an_nonbvconst_term: BVAND_TOK an_term an_term  */
#line 784 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVAND, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2256 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 73: /* an_nonbvconst_term: BVOR_TOK an_term an_term  */
#line 792 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVOR, width, *(yyvsp[-1].node), *(yyvsp[0].node)); 
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2268 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 74: /* an_nonbvconst_term: BVXOR_TOK an_term an_term  */
#line 800 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n =GlobalParserInterface->newNode(BVXOR, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2280 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 75: /* an_nonbvconst_term: BVXNOR_TOK an_term an_term  */
#line 808 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
  {
//   (bvxnor s t) abbreviates (bvor (bvand s t) (bvand (bvnot s) (bvnot t)))

	
      unsigned int width = (yyvsp[-1].node)->GetValueWidth();
      ASTNode * n = new ASTNode(
      GlobalParserInterface->nf->CreateTerm( BVOR, width,
     GlobalParserInterface->nf->CreateTerm(BVAND, width, *(yyvsp[-1].node), *(yyvsp[0].node)),
     GlobalParserInterface->nf->CreateTerm(BVAND, width,
	     GlobalParserInterface->nf->CreateTerm(BVNOT, width, *(yyvsp[-1].node)),
     	 GlobalParserInterface->nf->CreateTerm(BVNOT, width, *(yyvsp[0].node))
     )));

      (yyval.node) = n;
      delete (yyvsp[-1].node);
      delete (yyvsp[0].node);
  
  }
#line 2303 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 76: /* an_nonbvconst_term: BVCOMP_TOK an_term an_term  */
#line 827 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
  {
	

  	ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(ITE, 1, 
  	GlobalParserInterface->nf->CreateNode(EQ, *(yyvsp[-1].node), *(yyvsp[0].node)),
  	GlobalParserInterface->CreateOneConst(1),
  	GlobalParserInterface->CreateZeroConst(1)));
  	
      (yyval.node) = n;
      delete (yyvsp[-1].node);
      delete (yyvsp[0].node);
  }
#line 2320 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 77: /* an_nonbvconst_term: BVSUB_TOK an_term an_term  */
#line 842 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  const unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVSUB, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2332 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 78: /* an_nonbvconst_term: BVPLUS_TOK an_terms  */
#line 850 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  const unsigned int width = (*(yyvsp[0].vec))[0].GetValueWidth();
  ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(BVPLUS, width, *(yyvsp[0].vec)));
  (yyval.node) = n;
  delete (yyvsp[0].vec);

}
#line 2344 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 79: /* an_nonbvconst_term: BVMULT_TOK an_terms  */
#line 858 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  const unsigned int width = (*(yyvsp[0].vec))[0].GetValueWidth();
  ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(BVMULT, width, *(yyvsp[0].vec)));
  (yyval.node) = n;
  delete (yyvsp[0].vec);
}
#line 2355 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 80: /* an_nonbvconst_term: BVDIV_TOK an_term an_term  */
#line 866 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVDIV, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;

  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2368 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 81: /* an_nonbvconst_term: BVMOD_TOK an_term an_term  */
#line 875 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVMOD, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;

  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2381 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 82: /* an_nonbvconst_term: SBVDIV_TOK an_term an_term  */
#line 884 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(SBVDIV, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;

  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2394 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 83: /* an_nonbvconst_term: SBVREM_TOK an_term an_term  */
#line 893 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(SBVREM, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2406 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 84: /* an_nonbvconst_term: SBVMOD_TOK an_term an_term  */
#line 901 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(SBVMOD, width, *(yyvsp[-1].node), *(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2418 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 85: /* an_nonbvconst_term: BVNAND_TOK an_term an_term  */
#line 909 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(BVNOT, width, GlobalParserInterface->nf->CreateTerm(BVAND, width, *(yyvsp[-1].node), *(yyvsp[0].node))));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2430 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 86: /* an_nonbvconst_term: BVNOR_TOK an_term an_term  */
#line 917 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int width = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = new ASTNode(GlobalParserInterface->nf->CreateTerm(BVNOT, width, GlobalParserInterface->nf->CreateTerm(BVOR, width, *(yyvsp[-1].node), *(yyvsp[0].node)))); 
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2442 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 87: /* an_nonbvconst_term: BVLEFTSHIFT_1_TOK an_term an_term  */
#line 925 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  // shifting left by who know how much?
  unsigned int w = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVLEFTSHIFT,w,*(yyvsp[-1].node),*(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2455 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 88: /* an_nonbvconst_term: BVRIGHTSHIFT_1_TOK an_term an_term  */
#line 934 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  // shifting right by who know how much?
  unsigned int w = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVRIGHTSHIFT,w,*(yyvsp[-1].node),*(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2468 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 89: /* an_nonbvconst_term: BVARITHRIGHTSHIFT_TOK an_term an_term  */
#line 943 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  // shifting arithmetic right by who know how much?
  unsigned int w = (yyvsp[-1].node)->GetValueWidth();
  ASTNode * n = GlobalParserInterface->newNode(BVSRSHIFT,w,*(yyvsp[-1].node),*(yyvsp[0].node));
  (yyval.node) = n;
  delete (yyvsp[-1].node);
  delete (yyvsp[0].node);
}
#line 2481 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 90: /* an_nonbvconst_term: BVROTATE_LEFT_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK an_term  */
#line 952 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
      
  ASTNode *n;
  unsigned width = (yyvsp[0].node)->GetValueWidth();
  unsigned rotate = (yyvsp[-2].uintval);
  if (0 == rotate)
    {
      n = (yyvsp[0].node);
    }
  else if (rotate < width)
    {
      ASTNode high = GlobalParserInterface->CreateBVConst(32,width-1);
      ASTNode zero = GlobalParserInterface->CreateBVConst(32,0);
      ASTNode cut = GlobalParserInterface->CreateBVConst(32,width-rotate);
      ASTNode cutMinusOne = GlobalParserInterface->CreateBVConst(32,width-rotate-1);

      ASTNode top =  GlobalParserInterface->nf->CreateTerm(BVEXTRACT,rotate,*(yyvsp[0].node),high, cut);
      ASTNode bottom =  GlobalParserInterface->nf->CreateTerm(BVEXTRACT,width-rotate,*(yyvsp[0].node),cutMinusOne,zero);
      n =  new ASTNode(GlobalParserInterface->nf->CreateTerm(BVCONCAT,width,bottom,top));
      delete (yyvsp[0].node);
    }
  else
    {
      n = NULL; // remove gcc warning.
      yyerror("Rotate must be strictly less than the width.");
    }
      
  (yyval.node) = n;
      
}
#line 2516 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 91: /* an_nonbvconst_term: BVROTATE_RIGHT_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK an_term  */
#line 983 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
      
  ASTNode *n;
  unsigned width = (yyvsp[0].node)->GetValueWidth();
  unsigned rotate = (yyvsp[-2].uintval);
  if (0 == rotate)
    {
      n = (yyvsp[0].node);
    }
  else if (rotate < width)
    {
      ASTNode high = GlobalParserInterface->CreateBVConst(32,width-1);
      ASTNode zero = GlobalParserInterface->CreateBVConst(32,0);
      ASTNode cut = GlobalParserInterface->CreateBVConst(32,rotate); 
      ASTNode cutMinusOne = GlobalParserInterface->CreateBVConst(32,rotate-1);

      ASTNode bottom =  GlobalParserInterface->nf->CreateTerm(BVEXTRACT,rotate,*(yyvsp[0].node),cutMinusOne, zero);
      ASTNode top =  GlobalParserInterface->nf->CreateTerm(BVEXTRACT,width-rotate,*(yyvsp[0].node),high,cut);
      n =  new ASTNode(GlobalParserInterface->nf->CreateTerm(BVCONCAT,width,bottom,top));
      delete (yyvsp[0].node);
    }
  else
    {
      n = NULL; // remove gcc warning.
      yyerror("Rotate must be strictly less than the width.");
    }
      
  (yyval.node) = n;
      
}
#line 2551 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 92: /* an_nonbvconst_term: BVREPEAT_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK an_term  */
#line 1014 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
    {
	  unsigned count = (yyvsp[-2].uintval);
	  if (count < 1)
	  	FatalError("One or more repeats please");

	  unsigned w = (yyvsp[0].node)->GetValueWidth();  
      ASTNode n =  *(yyvsp[0].node);
      
      for (unsigned i =1; i < count; i++)
      {
      	  n = GlobalParserInterface->nf->CreateTerm(BVCONCAT,w*(i+1),n,*(yyvsp[0].node));
      }
       delete (yyvsp[0].node);
      (yyval.node) = new ASTNode(n);
    }
#line 2571 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 93: /* an_nonbvconst_term: BVSX_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK an_term  */
#line 1030 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned w = (yyvsp[0].node)->GetValueWidth() + (yyvsp[-2].uintval);
  ASTNode width = GlobalParserInterface->CreateBVConst(32,w);
  ASTNode *n =  new ASTNode(GlobalParserInterface->nf->CreateTerm(BVSX,w,*(yyvsp[0].node),width));
  (yyval.node) = n;
  delete (yyvsp[0].node);
}
#line 2583 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 94: /* an_nonbvconst_term: BVZX_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK an_term  */
#line 1038 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned w = (yyvsp[0].node)->GetValueWidth() + (yyvsp[-2].uintval);
  ASTNode width = GlobalParserInterface->CreateBVConst(32,w);
  ASTNode *n =  new ASTNode(GlobalParserInterface->nf->CreateTerm(BVZX,w,*(yyvsp[0].node),width));
  (yyval.node) = n;
  delete (yyvsp[0].node);
}
#line 2595 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 95: /* sort_symb: BITVEC_TOK LBRACKET_TOK NUMERAL_TOK RBRACKET_TOK  */
#line 1049 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  // Just return BV width.  If sort is BOOL, width is 0.
  // Otherwise, BITVEC[w] returns w. 
  //
  //((indexwidth is 0) && (valuewidth>0)) iff type is BV
  (yyval.indexvaluewidth).indexwidth = 0;
  unsigned int length = (yyvsp[-1].uintval);
  if(length > 0) {
    (yyval.indexvaluewidth).valuewidth = length;
  }
  else {
    FatalError("Fatal Error: parsing: BITVECTORS must be of positive length: \n");
  }
}
#line 2614 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 96: /* sort_symb: ARRAY_TOK LBRACKET_TOK NUMERAL_TOK COLON_TOK NUMERAL_TOK RBRACKET_TOK  */
#line 1064 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  unsigned int index_len = (yyvsp[-3].uintval);
  unsigned int value_len = (yyvsp[-1].uintval);
  if(index_len > 0) {
    (yyval.indexvaluewidth).indexwidth = (yyvsp[-3].uintval);
  }
  else {
    FatalError("Fatal Error: parsing: BITVECTORS must be of positive length: \n");
  }

  if(value_len > 0) {
    (yyval.indexvaluewidth).valuewidth = (yyvsp[-1].uintval);
  }
  else {
    FatalError("Fatal Error: parsing: BITVECTORS must be of positive length: \n");
  }
}
#line 2636 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 97: /* var: FORMID_TOK  */
#line 1085 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode((*(yyvsp[0].node))); 
  delete (yyvsp[0].node);      
}
#line 2645 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 98: /* var: TERMID_TOK  */
#line 1090 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode((*(yyvsp[0].node)));
  delete (yyvsp[0].node);
}
#line 2654 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 99: /* var: QUESTION_TOK TERMID_TOK  */
#line 1095 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = (yyvsp[0].node);
}
#line 2662 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 100: /* fvar: DOLLAR_TOK FORMID_TOK  */
#line 1102 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = (yyvsp[0].node); 
}
#line 2670 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;

  case 101: /* fvar: FORMID_TOK  */
#line 1106 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"
{
  (yyval.node) = new ASTNode((*(yyvsp[0].node))); 
  delete (yyvsp[0].node);      
}
#line 2679 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"
    break;


#line 2683 "/build/stp/src/build/lib/Parser/parsesmt.tab.c"

      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;

  *++yyvsp = yyval;

  /* Now 'shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */
  {
    const int yylhs = yyr1[yyn] - YYNTOKENS;
    const int yyi = yypgoto[yylhs] + *yyssp;
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
               ? yytable[yyi]
               : yydefgoto[yylhs]);
  }

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == SMTEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (AssertsQuery, YY_("syntax error"));
    }

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= SMTEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == SMTEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval, AssertsQuery);
          yychar = SMTEMPTY;
        }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:
  /* Pacify compilers when the user code never invokes YYERROR and the
     label yyerrorlab therefore never appears in user code.  */
  if (0)
    YYERROR;
  ++yynerrs;

  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  /* Pop stack until we find a state that shifts the error token.  */
  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYSYMBOL_YYerror;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;


      yydestruct ("Error: popping",
                  YY_ACCESSING_SYMBOL (yystate), yyvsp, AssertsQuery);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturnlab;


/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturnlab;


/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
`-----------------------------------------------------------*/
yyexhaustedlab:
  yyerror (AssertsQuery, YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  if (yychar != SMTEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval, AssertsQuery);
    }
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, AssertsQuery);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif

  return yyresult;
}

#line 1111 "/build/stp/src/stp-2.3.4/lib/Parser/smt.y"


namespace stp {
  int SMTParse(void* AssertsQuery) {
    return smtparse(AssertsQuery);
  }
}
