Murphy Berzish
15055c8041
use mk_int_var to make xor terms
2016-09-14 19:01:14 -04:00
Murphy Berzish
d334403720
remove relevancy testing experiment
2016-09-14 17:42:40 -04:00
Murphy Berzish
f22f4da023
remove unused variable
2016-09-14 17:33:47 -04:00
Murphy Berzish
9ee7326a19
tweaks to process_concat_eq_type_3
2016-09-14 17:26:52 -04:00
Murphy Berzish
a294c145dc
add theory_str::try_eval_concat to work around rewriter behaviour
...
this fixes a regression in concat-013.smt2
2016-09-14 16:18:03 -04:00
Murphy Berzish
e46fc7b0b6
fix expr-app conversion
2016-09-14 15:51:33 -04:00
Murphy Berzish
804009a757
use z3str2 eqc semantics for get_eqc_value
2016-09-14 15:37:48 -04:00
Murphy Berzish
50353168ef
fix semantics of get_concats_in_eqc and get_var_in_eqc
2016-09-14 15:36:36 -04:00
Murphy Berzish
87d61d6d6e
fix semantics of in_same_eqc
2016-09-14 15:35:37 -04:00
Murphy Berzish
ec9e1686f7
fix semantics of collect_eq_nodes and simplify_parent
2016-09-14 15:32:49 -04:00
Murphy Berzish
9481601b4b
restore z3str2 eqc semantics in theory_str::new_eq_check
2016-09-14 15:15:47 -04:00
Murphy Berzish
34dc655150
z3str2 eqc semantics for theory_str unroll checks
2016-09-13 18:24:59 -04:00
Murphy Berzish
8f636e1f57
fix typo'ed set reference in handle_equality
2016-09-13 18:16:21 -04:00
Murphy Berzish
aea0032aa7
manage our own union-find structure in theory_str
...
concat-086.smt2 passes with this, for the first time ever
2016-09-13 18:01:45 -04:00
Murphy Berzish
ca71a20ab7
add caching to theory_str::mk_concat, WIP
2016-09-12 17:17:17 -04:00
Murphy Berzish
015016c92b
disable variable scope check if not tracing in theory_str
2016-09-12 16:57:05 -04:00
Murphy Berzish
b3fddf4707
performance optimization in theory_str::classify_ast_by_type
2016-09-12 16:41:35 -04:00
Murphy Berzish
2c5569aa1f
change cut_var_map to obj_map
2016-09-12 15:43:58 -04:00
Murphy Berzish
82e07aae8c
disable deferred eqc check in theory_str
2016-09-08 19:55:08 -04:00
Murphy Berzish
c83e39d3b8
fix incorrect axiom in theory_str for Contains check
...
this partially fixes a regression in contains-034.smt2, which now
is at least not a SAT-as-UNSAT
2016-09-05 17:45:10 -04:00
Murphy Berzish
7b34efada7
add aggressive unroll test option to theory_str
2016-09-04 18:48:15 -04:00
Murphy Berzish
347f441517
add a check for variable scope to theory_str
2016-09-02 20:44:14 -04:00
Murphy Berzish
2b8f165cc4
patch UNSAT to UNKNOWN in cmd_context for theory_str
2016-09-02 19:04:20 -04:00
Murphy Berzish
d3062a8eff
omit out-of-scope length testers from axiom premise in theory_str::gen_len_test_options
...
this fixes a regression in charAt-007.smt2
2016-09-02 18:23:41 -04:00
Murphy Berzish
f9b4f21683
add rewrite for theory_str rewriter RegexPlus
...
fixes regex-013.smt2
2016-08-31 19:22:04 -04:00
Murphy Berzish
5e22bc57c8
theory_str cleanup
2016-08-31 19:19:23 -04:00
Murphy Berzish
89d5f4ffb4
add compute_contains check to theory_str
...
this may cause a crash in indexof-002.smt2 but
I cannot reproduce it
2016-08-21 21:37:46 -04:00
Murphy Berzish
2a199294a1
remove incorrect null pointer check from theory_str::gen_len_val_options_for_free_var
...
everything that calls this method knows that it can legally return null
2016-08-21 00:43:00 -04:00
Murphy Berzish
7b3203b48e
disable aggressive length/value testing in theory_str, it seems to be detrimental
2016-08-21 00:30:29 -04:00
Murphy Berzish
1a75781a3c
add experimental option to defer new_eq_check to final_check in theory_str
2016-08-20 23:09:08 -04:00
Murphy Berzish
481e97a274
propagate early in theory_str to set up contains/regex maps
...
this fixes an unsat-as-sat error in a regex test and flips around some timeouts
so more work will be required to track this down
2016-08-19 22:53:36 -04:00
Murphy Berzish
8598a48e3b
fix weird Contains rewriter behaviour in theory_str
2016-08-18 19:14:50 -04:00
Murphy Berzish
3c8b833eeb
fix expression dereference error in theory_str::gen_assign_unroll_Str2Reg
2016-08-18 17:03:32 -04:00
Murphy Berzish
54d7e4bbb5
remove the option to bypass check_regex_in in theory_str
2016-08-17 21:12:19 -04:00
Murphy Berzish
6263391c11
fix out-of-range integer comparison bug in string NFA
2016-08-17 20:58:57 -04:00
Murphy Berzish
71ad4d3a4a
add regex_in_bool_map to theory_str
2016-08-17 16:21:19 -04:00
Murphy Berzish
0834229b39
theory_str model validation for substr
2016-08-17 15:33:02 -04:00
Murphy Berzish
48081864b0
add regex validation in str_rewriter
2016-08-16 18:07:31 -04:00
Murphy Berzish
685edbb268
pull out incorrectly-used data structures in theory_str for contains check, this will need to be revisited
2016-08-15 18:58:36 -04:00
Murphy Berzish
d28ef1d471
add theory_str::check_contain_by_eq_nodes
2016-08-15 17:38:24 -04:00
Murphy Berzish
f48377e780
temporarily disable a third Contains check for testing purposes
2016-08-14 16:14:48 -04:00
Murphy Berzish
ee6f1eef69
add theory_str::check_contain_by_substr
2016-08-14 15:14:48 -04:00
Murphy Berzish
1f594b190a
add theory_str::check_contain_by_eqc_val
2016-08-14 14:55:29 -04:00
Murphy Berzish
6612971049
start adding Contains checks to theory_str
2016-08-14 14:15:29 -04:00
Murphy Berzish
f7ba3ff084
crash avoidance in theory_str search start, fixes length-001.smt2 regression
2016-08-09 20:11:25 -04:00
Murphy Berzish
3dff240bb3
theory_str model validation for Length
2016-08-07 15:50:41 -04:00
Murphy Berzish
cb566ad5ce
fix model validation for theory_str
2016-08-07 15:43:08 -04:00
Murphy Berzish
395ec4543c
avoid crash in theory_str, this leaks memory
2016-08-06 22:19:10 -04:00
Murphy Berzish
43b0cd5010
clean up unused variables in theory_str.cpp
2016-08-06 15:38:58 -04:00
Murphy Berzish
2c91f388df
add defensive double-non-concat check in theory_str::simplify_concat_equality()
2016-08-06 15:35:47 -04:00
Murphy Berzish
91c336d7ee
fix erroneous vector double-insert in theory_str::group_terms_by_eqc()
2016-08-06 15:32:37 -04:00
Murphy Berzish
0c4e725902
finish theory_str::mk_concat, no caching of generated terms yet
2016-08-04 16:40:05 -04:00
Murphy Berzish
bc91d182bf
mk_concat fixes WIP
2016-08-03 13:39:14 -04:00
Murphy Berzish
3c2fe497de
modify theory_str::get_value() to check EQC for a numeral
...
Instead of asking the arithmetic theory for the current assignment,
we return the (unique) numeral in the equivalence class of the term
whose length we want to know.
This is because the arithmetic theory may return a default / internal
value that doesn't correspond to anything actually asserted by the core solver.
2016-08-02 16:44:54 -04:00
Murphy Berzish
45c4954959
add debugging to theory_str::get_len_value in preparation for fixes
2016-08-02 14:52:44 -04:00
Murphy Berzish
a51ad07e3f
crash avoidance in propagation of basic string axioms and gen_len_test_options
2016-08-01 20:52:49 -04:00
Murphy Berzish
97f07a8a7c
fix debugging statements in theory_str::gen_len_test_options
...
this fixes charAt-007.smt2 and prevents two unique crashes
2016-08-01 18:14:56 -04:00
Murphy Berzish
ee1af96f1b
add opt_NoQuickReturn_IntegerTheory check in theory_str::new_eq_check()
...
This allows us to assert an "inconsistent length" axiom from the integer theory
while continuing in new_eq_handler(). Currently active when
opt_NoQuickReturn_IntegerTheory is 'true' but this may be necessary
here and in other places, in general, to fix integer theory integration.
2016-08-01 17:05:02 -04:00
Murphy Berzish
6e348720b1
add integer theory integration to theory_str::solve_concat_eq_str case 4
2016-07-31 18:12:57 -04:00
Murphy Berzish
778c0a5563
improve theory_str::group_terms_by_eqc now that we have simplify_concat
2016-07-31 16:55:17 -04:00
Murphy Berzish
9ceb2df28f
add integer integration to theory_str::simplify_parent
2016-07-31 16:51:35 -04:00
Murphy Berzish
41497f44c1
prevent checking scope of XOR variables in theory_str::process_concat_eq
2016-07-31 16:30:52 -04:00
Murphy Berzish
f5b82740c3
debugging length testers in theory_str::gen_len_val_options_for_free_var
2016-07-31 16:26:56 -04:00
Murphy Berzish
8958eea27c
crash avoidance in theory_str cut_var_map writes
2016-07-31 11:22:04 -04:00
Murphy Berzish
7f3a260eda
more aggressive simplifications in theory_str::handle equality, WIP, not tested yet
2016-07-30 16:58:59 -04:00
Murphy Berzish
6f67e9cdda
fix theory_str::check_length_concat_concat to actually assert the conflict axiom
2016-07-28 17:18:56 -04:00
Murphy Berzish
244b611f1c
fix infinite loop bug in theory_str::new_eq_check
2016-07-28 17:10:41 -04:00
Murphy Berzish
999420485b
add theory_str::check_length_eq_var_concat and helper methods
2016-07-28 16:49:39 -04:00
Murphy Berzish
76ceac6664
add theory_str::check_length_const_string
2016-07-28 16:31:40 -04:00
Murphy Berzish
95f1cfa5a6
add theory_str::check_length_consistency, WIP
2016-07-27 16:18:05 -04:00
Murphy Berzish
a31a948a5b
add theory_str::can_concat_eq_concat
2016-07-27 15:21:33 -04:00
Murphy Berzish
ceed3f3ff0
add theory_str::can_concat_eq_str
2016-07-27 15:15:01 -04:00
Murphy Berzish
1c518be61d
new_eq_handler improvements in theory_str, WIP
2016-07-27 12:46:35 -04:00
Murphy Berzish
f555074e27
add option to disable integer theory integration in theory_str; this is currently ENABLED
2016-07-23 23:29:56 -04:00
Murphy Berzish
02a66c425e
add option to bypass quick returns in integer theory integration in theory_str
...
this might not actually be that useful, if the problem is, as I suspect it to be,
that values we get from the integer theory need not correspond with
assertions in the core (that can get popped off the stack, etc.)
2016-07-23 22:43:46 -04:00
Murphy Berzish
ac16aa7c81
fix out-of-scope variable bug in theory_str::process_concat_eq_type6
...
this fix will have to be made to all functions that use varForBreakConcat
2016-07-23 16:02:11 -04:00
Murphy Berzish
0f38203779
add RegexCharRange to theory_str
2016-07-19 16:39:43 -04:00
Murphy Berzish
9ffcd135d5
add RegexPlus to theory_str
2016-07-19 15:47:41 -04:00
Murphy Berzish
8d47b08244
fix out-of-scope value tester bug in theory_str::gen_free_var_options()
...
we now pass tests/z3str/charAt-003.smt2 with detailed debugging turned off!
2016-07-10 13:05:41 -04:00
Murphy Berzish
8aa6fee0af
fixups wip
2016-07-08 12:21:11 -04:00
Murphy Berzish
847a5fc1f8
replace old mk_value behaviour in theory_str that creates placeholders for unused terms instead of crashing
2016-07-07 16:13:48 -04:00
Murphy Berzish
9eead64d03
prevent assertion of basic string axioms on variables that go out of scope (theory_str)
...
this is testing a crash avoidance feature, the regression is tests/z3str/regex-026.smt2
this also adds some debugging code for a substr() crash but that is WIP
2016-07-06 17:31:37 -04:00
Murphy Berzish
7d903ff1fa
implement process_concat_eq_unroll, WIP
2016-06-30 04:55:11 -04:00
Murphy Berzish
b53da182b6
fix gen_assign_unroll_reg so that it does not assert a contradiction
2016-06-30 04:39:09 -04:00
Murphy Berzish
a2d6149df5
add general-case regex unroll model generation
...
WIP as there is currently a SAT-as-UNSAT bug I'm trying to fix
This also changes the semantics of lower_bound and upper_bound,
no longer wrapping the expr that is passed in with mk_strlen().
This actually makes these methods useful for checking bounds
of things other than strings.
2016-06-30 04:00:42 -04:00
Murphy Berzish
b4110c886f
successful unroll of simple unbounded Str2Reg
2016-06-30 02:46:16 -04:00
Murphy Berzish
427632ede3
let free variable assignment work a bit more towards unrolls
2016-06-30 01:42:00 -04:00
Murphy Berzish
21f0a50aba
add Unroll check to get_eqc_allUnroll
2016-06-30 01:24:43 -04:00
Murphy Berzish
03827cb487
add more Unroll support to final_check, ctx_dep_analysis
2016-06-30 01:21:21 -04:00
Murphy Berzish
b31d1a92aa
add more support for unroll (WIP)
2016-06-27 14:41:57 -04:00
Murphy Berzish
020e8aef6d
regex union
2016-06-23 17:14:03 -04:00
Murphy Berzish
04803d7a3b
starting regex support
2016-06-23 15:24:35 -04:00
Murphy Berzish
4c34629806
starting regex support, rewriter
2016-06-21 21:13:16 -04:00
Murphy Berzish
a808a8c587
theory_str infer_len_concat_arg
2016-06-21 17:38:49 -04:00
Murphy Berzish
1e46782392
theory_str infer_len_concat
2016-06-21 17:25:28 -04:00
Murphy Berzish
ba42478f9b
string-integer wip
2016-06-20 20:02:22 -04:00
Murphy Berzish
89a337ba7e
quick path with string-integer integration in theory_str::simplify_concat_equality
2016-06-19 18:25:31 -04:00
Murphy Berzish
5b3c868c90
theory_str Replace method
2016-06-15 21:14:54 -04:00
Murphy Berzish
fb20951064
theory_str Substr support WIP
2016-06-15 20:26:07 -04:00
Murphy Berzish
be5bf7fb80
LastIndexof support
2016-06-15 18:45:01 -04:00