Skip to content

Commit 0d3c29a

Browse files
handle larger buffers
1 parent 6b32aae commit 0d3c29a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/tptp/tptp5.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,10 +2311,10 @@ static void display_smt2(std::ostream& out) {
23112311
asms.push_back(fmls.m_formulas[i]);
23122312

23132313
for (size_t i = 0; i < asms.size(); ++i) {
2314-
z3::expr fml = asms[i];
2314+
z3::expr fml = asms[(unsigned)i];
23152315
if (fml.is_and()) {
23162316
z3::expr arg0 = fml.arg(0);
2317-
asms.set(i, arg0);
2317+
asms.set((unsigned)i, arg0);
23182318
for (unsigned j = 1; j < fml.num_args(); ++j)
23192319
asms.push_back(fml.arg(j));
23202320
--i;
@@ -2323,7 +2323,7 @@ static void display_smt2(std::ostream& out) {
23232323

23242324
Z3_ast* assumptions = new Z3_ast[asms.size()];
23252325
for (size_t i = 0; i < asms.size(); ++i)
2326-
assumptions[i] = asms[i];
2326+
assumptions[i] = asms[(unsigned)i];
23272327
Z3_set_ast_print_mode(ctx, Z3_PRINT_SMTLIB_FULL);
23282328
Z3_string s =
23292329
Z3_benchmark_to_smtlib_string(

examples/tptp/tptp5.lex.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ typedef unsigned int flex_uint32_t;
147147

148148
/* Size of default input buffer. */
149149
#ifndef YY_BUF_SIZE
150-
#define YY_BUF_SIZE 16384
150+
#define YY_BUF_SIZE 8*16384
151151
#endif
152152

153153
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -648,7 +648,7 @@ static int yy_prev_more_offset = 0;
648648
yyleng -= (yy_more_offset); \
649649
}
650650
#ifndef YYLMAX
651-
#define YYLMAX 8192
651+
#define YYLMAX 2*8*8192
652652
#endif
653653

654654
char yytext[YYLMAX];
@@ -1877,6 +1877,7 @@ static int yy_get_next_buffer (void)
18771877
while ( num_to_read <= 0 )
18781878
{ /* Not enough room in the buffer - grow it. */
18791879

1880+
printf("%zu %d %zu\n", YY_CURRENT_BUFFER_LVALUE->yy_buf_size, number_to_move, num_to_read);
18801881
YY_FATAL_ERROR(
18811882
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
18821883

0 commit comments

Comments
 (0)