Subject: Re: Sample (Resend)

From: Cheng Xu <[email-masked]>
Date: Tue, 7 Nov 1995 19:47:44 +0800 (EAT)

Hi, Guansong,

I have sent following mail to you last evening, but I found there are
some errors in it when I reviewed it today. Now, I re-send the corrected
one to you. 

> There is a problem, where I leaved unsolved. I don't know how to complete the
> FORALL stat. Should I add a Contrl-end to it? If not how about the relation
> between Forall stat and Forall-assignment_stmt?

For FORALL stat can only be followed by a assignment stat, so we should 
not add a control-end to it. Because we have defined 2 different VARIANT 
for the FORALL(the FORALL_STATEMENT and the FORALL_CONSTRUCT), we will know 
the assignment stat, following a FORALL with variant of FORALL_STATEMENT, must
be the body of the FORALL stmt (just like the way Sage++ treats IF with 
no else or endif, and followed by only one stmt). Do you think it is 
right?

> It's not a serious question, but I think it's better to make it clear how
> ExpList is used in Sage++ system, so there won't trouble in the future.

When we analyzed the working process of f2dep, we found Sage++ only use 
Explist to declare the Variables. But we think Explist should be used to
specify the structure of expression in C program  according to the 
document along with Sage++ distribution(../doc/oonski94.ps). So, in Beida's
definition, ExpList is used to represent the parentheses, e.g.,

	(((a+b)+c)+d)

	will be 
// !!! Sorry, I have made some mistakes in the order of a,b,c,d in the 
last mail 

			(Explist)	;the subexpression constructed
			   |		;by OP in Explist's left pointer 
		      |----+-----|	;should be enclosed by a parentheses
		      |	         |
		     (+)        
		      |
                 |----+-----|
                 |          |
              (Explist)    (d)
                    |
              |-----+-----|
              |           |
             (+)
              |
       |------+-----|
       |            |
     (Explist)     (c)
            |
      |-----+------|
      |            |
     (+)
      |
 |----+----|
 |         |
(a)       (b)                     

 	but not( the way Sage++ does f2dep) 

		(+)
		 |
           |-----|-----|
           |           |
          (+)         (a)
           |
       |---+---|
       |       |
      (+)      (b)
       |
    |--+---|
    |      |
   (d)    (c)

     So, Sage++ is not able to parse and then unparse above expression
to original form. (What Prof. Li told Beida to do is to represent 
the source program fainthfully)
     How do you think about above mentioned definition? 

> Why the email I send to  Tshinghua were all sent back?

Because Tsinghua is rebuilding their Campus Network and try to 
improve Tsinghua campus network's bandwidth now.

Now, we are busy with parsing the Sample.

Regards

Chengxu