From d4d65c2138cd1fa07185623e42d3b6c1393f086b Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 5 Apr 2012 14:30:03 +0200 Subject: Bug fixes and improvements of dialyzer_typesig 1. Sometimes the solver forgot that a list had entered the error state. The bug has been fixed by storing the atom 'error' in MapDict. An example where the bug occurred is io_lib_pretty:printable_bin(). The returned spec was weaker than it should have been, but the fix-point loop hid the bug (in this case). 2. lists:partition() has been substituted for lists:splitwith() in enumerate_constraints(). This fix together with 3. solves a problem with long execution times for deeply nested fun:s. An example which is now much faster is lib/compiler/test/lc_SUITE:deeply_nested/1 (included as dialyzer/test/small_SUITE_data/src/deep_lc.erl). 3. The calculation of components in enumerate_constraints() has been simplified and optimized. The important thing here is that _all_ of the simple constraints have been saturated before entering the complex part. 4. The pretty printing of constraints has been improved. --- lib/dialyzer/test/opaque_SUITE_data/results/queue | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/dialyzer/test/opaque_SUITE_data') diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/queue b/lib/dialyzer/test/opaque_SUITE_data/results/queue index 59ce33f098..c3f04ea64d 100644 --- a/lib/dialyzer/test/opaque_SUITE_data/results/queue +++ b/lib/dialyzer/test/opaque_SUITE_data/results/queue @@ -5,6 +5,7 @@ queue_use.erl:27: The attempt to match a term of type queue() against the patter queue_use.erl:33: Attempt to test for equality between a term of type {[42,...],[]} and a term of opaque type queue() queue_use.erl:36: The attempt to match a term of type queue() against the pattern {F, _R} breaks the opaqueness of the term queue_use.erl:40: The call queue:out({[42,...],[]}) does not have an opaque term of type queue() as 1st argument +queue_use.erl:48: The call queue_use:add_unique(42,#db{p::[],q::queue()}) contains an opaque term as 2nd argument when terms of different types are expected in these positions queue_use.erl:51: The call queue_use:is_in_queue(E::42,DB::#db{p::[],q::queue()}) contains an opaque term as 2nd argument when terms of different types are expected in these positions queue_use.erl:56: The attempt to match a term of type #db{p::[],q::queue()} against the pattern {'db', _, {L1, L2}} breaks the opaqueness of queue() queue_use.erl:62: The call queue_use:tuple_queue({42,'gazonk'}) does not have a term of type {_,queue()} (with opaque subterms) as 1st argument -- cgit v1.2.3