Skip to content

Instantly share code, notes, and snippets.

@calio
Created August 13, 2015 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calio/480015dde8822e5afe06 to your computer and use it in GitHub Desktop.
Save calio/480015dde8822e5afe06 to your computer and use it in GitHub Desktop.
stp-r940.patch solve stp building failure described here http://klee.github.io/getting-started/
diff -ur stp-r940-origin/src/parser/CVC.y stp-r940-patched/src/parser/CVC.y
--- stp-r940-origin/src/parser/CVC.y 2013-12-12 08:13:18.000000000 -0800
+++ stp-r940-patched/src/parser/CVC.y 2015-08-13 12:07:25.797199030 -0700
@@ -22,7 +22,6 @@
#define YYMAXDEPTH 1048576000
#define YYERROR_VERBOSE 1
#define YY_EXIT_FAILURE -1
-#define YYPARSE_PARAM AssertsQuery
extern int cvclex(void);
extern char* yytext;
@@ -32,9 +31,12 @@
FatalError("");
return YY_EXIT_FAILURE;
};
+ int yyerror(void* AssertsQuery, const char* s) { return yyerror(s); }
%}
+%parse-param {void* AssertsQuery}
+
%union {
unsigned int uintval; /* for numerals in types. */
diff -ur stp-r940-origin/src/parser/smtlib2.y stp-r940-patched/src/parser/smtlib2.y
--- stp-r940-origin/src/parser/smtlib2.y 2013-12-12 08:13:18.000000000 -0800
+++ stp-r940-patched/src/parser/smtlib2.y 2015-08-13 12:09:45.653191801 -0700
@@ -64,6 +64,7 @@
FatalError("");
return 1;
}
+ int yyerror(void* AssertsQuery, const char* s) { return yyerror(s); }
ASTNode querysmt2;
ASTVec assertionsSMT2;
@@ -72,9 +73,10 @@
#define YYMAXDEPTH 104857600
#define YYERROR_VERBOSE 1
#define YY_EXIT_FAILURE -1
-#define YYPARSE_PARAM AssertsQuery
%}
+%parse-param {void* AssertsQuery}
+
%union {
unsigned uintval; /* for numerals in types. */
//ASTNode,ASTVec
diff -ur stp-r940-origin/src/parser/smtlib.y stp-r940-patched/src/parser/smtlib.y
--- stp-r940-origin/src/parser/smtlib.y 2013-12-12 08:13:18.000000000 -0800
+++ stp-r940-patched/src/parser/smtlib.y 2015-08-13 12:09:41.433192020 -0700
@@ -54,15 +54,17 @@
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
-#define YYPARSE_PARAM AssertsQuery
%}
+%parse-param {void* AssertsQuery}
+
%union {
// FIXME: Why is this not an UNSIGNED int?
int uintval; /* for numerals in types. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment