do not unify partial strings unless they coincide in memory

This commit is contained in:
Mark Thom
2018-09-03 00:20:01 -06:00
parent c5fd13dfa0
commit 3960ea4f06
2 changed files with 11 additions and 8 deletions

View File

@@ -1881,6 +1881,9 @@ fn test_queries_on_string_lists()
assert_prolog_success!(&mut wam, "?- partial_string(\"abc\", X).",
[["X = [a, b, c | _]"]]);
assert_prolog_failure!(&mut wam, "?- partial_string(\"abc\", X), partial_string(\"abc\", Y), matcher(X, V),
matcher(Y, Z), V = Z.");
submit(&mut wam, "matcher([a, b, c | X], X).");
assert_prolog_success!(&mut wam, "?- partial_string(\"abc\", X), matcher(X, Y).",