COMP 105 fault graph for type unifiers

Test results in matrix form are on another page.

The graph below shows the results of testing type unifiers.
Read the nodes as follows:

The edges show which solutions are strictly better than which other solutions; better solutions appear higher in the graph.

If the graph is blurry or pixelated, click on it to get Scalable Vector Graphics, then zoom.
From left to right, the tests in the graph exposed these faults:
1. Types 'a and 'a can be unified, but your unifier failed with the message Cannot unify 'a and 'a.
2a. Unifying int and 'a raised an exception other than TypeError, which is the only exception that 'unify' may raise.
3a. Unifying 'a and ('a) raised an exception other than TypeError, which is the only exception that 'unify' may raise.
3b. Types 'a and ('a) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
4a. Unifying 'a and ('b 'a) raised an exception other than TypeError, which is the only exception that 'unify' may raise.
4b. Types 'a and ('b 'a) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
5. Types ((int)) and ((int)) can be unified, but your unifier failed with the message Cannot unify int and int.
6a. Types (list 'a) and (tuple 'b) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
7a. Unifying (list 'a) and (list 'a 'b) raised an exception other than TypeError, which is the only exception that 'unify' may raise.
8a. Unifying (((list)) (('a 'b))) and ('c 'b) raised an exception other than TypeError, which is the only exception that 'unify' may raise.
8b. Types (((list)) (('a 'b))) and ('c 'b) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
9. Types (list ('b 'a)) and (list ('a 'b)) can be unified, but your unifier failed with the message Cannot unify 'a 'b and 'b 'a.
9a. Given input types tau1 = (list ('b 'a)) and tau2 = (list ('a 'b)), your 'unify(tau1, tau2)' function returned a substitution theta that is not a unifier. The two types theta tau1 and theta tau2 should be equal, but theta tau1 = (list ('b 'a)), and theta tau2 = (list ('a 'b)) are different.
10a. Types (tuple 'a 'a) and (tuple int bool) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
11a. Unifying ((ref) (('a 'a array 'b))) and (('b) ('b)) raised an exception other than TypeError, which is the only exception that 'unify' may raise.
11b. Types ((ref) (('a 'a array 'b))) and (('b) ('b)) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
12a. Unifying (((list)) ((bool list) (array) bool)) and ('a ((bool list) 'b 'a)) raised an exception other than TypeError, which is the only exception that 'unify' may raise.
12b. Types (((list)) ((bool list) (array) bool)) and ('a ((bool list) 'b 'a)) are not unifiable, but instead of raising the 'TypeError' exception, your 'unify' function returned a substitution.
13. Types ('a (('b 'c 'c array) ('d 'd ref bool 'd))) and ('c (('b 'd 'c array) ('d 'b ref bool 'a))) can be unified, but your unifier failed.
13a. Given input types tau1 = ('a (('b 'c 'c array) ('d 'd ref bool 'd))) and tau2 = ('c (('b 'd 'c array) ('d 'b ref bool 'a))), your 'unify(tau1, tau2)' function returned a substitution theta that is not a unifier.
Back to the COMP 105 home page.