The Gateway to Computer Science Excellence
+1 vote
As in Ada, suppose that each expression must have a unique type, but that from a subexpression, by itself, all we can deduce is a set of  possible types. That is, the application of function $E_{1}$ to argument $E_{2}$ , represented by $E\rightarrow E_{l}(E_{2})$, has the associated rule

$E.type=\{t\mid \text{for some $s$ in} \:E_{2}.type,s\rightarrow t\: \text{is in}\: E_{1}.type\}$

Describe an SDD that determines a unique type for each subexpression by using an attribute $type$ to synthesize a set of possible types bottom-up, and, once the unique type of the overall expression is determined, proceeds top-down to determine attribute $unique$ for the type of each subexpression.
in Compiler Design by Veteran (58.7k points) | 113 views

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,272 answers
104,791 users