Question: Suppose that during type inference, a compiler generates the following constraints to be solved: = bool int r ; = int bool Solve those constraints

Suppose that during type inference, a compiler generates the following constraints to be solved:

= bool int r ; = int bool

Solve those constraints by the unification algorithm below. You need to write down the steps during constraint solving.

rules

Suppose that during type inference, a compiler generates the following constraints to

be solved: = bool int r ; = int bool Solve those

constraints by the unification algorithm below. You need to write down the

Unify( ) 11, the empty substitution . Unity((r,-72); E) Unity(E) if T-72 Unify((a-r); E) [ | o (Unify(Ela TD) if (r is not a free variable in T Unify( ) 11, the empty substitution . Unity((r,-72); E) Unity(E) if T-72 Unify((a-r); E) [ | o (Unify(Ela TD) if (r is not a free variable in T

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!