Subject: Re: discussing on next merging step

From: Zheng Gengbing <[email-masked]>
Date: Fri, 12 Apr 1996 13:51:58 +0800 (EAT)

On Thu, 11 Apr 1996, Guansong Zhang wrote:

> Hi,
> 
> As our merging keep progressing, we sure will meet the problem in hpf2dep.
> 
> >From pku's work, I can see you guys are also quite familiar with yacc. May be
> some one has already begin to see hit's io part!
> 
> But I don't feel right to let pku to merge the .y along like you did in
> previous time, hit should be also involved. The reason is this:
> 
> 1. bugs fixing done by hit is more thorough, (I can send a copy of my bug
> reports to you later, those reports point out around 30 bugs in the hpf2dep,
> and now only 5 are remains, you have already noticed two of them.)
> 
> 2. I/O part is added by hit. This part is not tested yet. And I'd say it almost
> certain there will be new bugs. That means it impossible to leave a complete
> hpf2dep to pku for the time being.
> 
> 3. Here we have a special guy for testing, he developed a test suite
> (previously I called them comprehensive tests) to examine the front end. There
> are 66 syntax bugs to be fixed. (These kind of bugs are different from the 30
> ones. Those bugs concerned with yacc action, while these concerned with yacc
> rules.) I think the original author still should be the best candidate to do
> this.
> 
> 4, From the comparing the results of dumpdep and unparse, I don't think pku
> change the construction of the node dramatically, most of you change are
> concerned with feature feilds, or the link feild about type. So the yacc rules
> should not be too different from hit's.
> 
> So I think the merging work on hpf2dep is better be done by both pku and hit.
> Other wise new trouble like we meet today may happen. Do you agree?
> 

	You are right , I never say we alone do the work . I only worry about
the  binding of hpf2dep & hpfcc .
	So , I think , as to a yacc rule , if it is already changed by us ,
please refer to our modification first before HIT do their change , because
our changes not only concern about the correctness of hpf2dep , but also
about the correctness of hpfcc .

> But it also presents a problem, the situation is more complex than basicop dir!
> (though I think merging basicop is simple, we still have not finished it yet.)
> Efforts must be made on both sides.
> 
> I need to know how many things was done in pku's hpf2dep. Since you are the
> only one reply my email in pku, I assume you are the project leader there.

	No , I am a first year graduate student . But half of the work is
done by me and I am familiar about other co-worker's work .  

> Something may not be done by you. But could you manage to give me a list about
> the difference between 1.0 and 1.25 in hpf2dep dir?
> 

	This is a breif list :

changes of  Zheng Gengbin  ,  signed by  /* zheng.gb */

1.    since the name  return a string , but in many places they use name as
  a symbol pointer . I noticed that in 1.0 , they do modified some places ,
  but there still remain some place unchanged .

2.    Do construct cannot passed in like :
	do 10 ...
       10 end
	I add label_end_do_stmt rule in f90.y .
3.    part_ref :
	if cannot search a record , this does not mean it cannot be reference.
	since you did not concern the use association . That is the record
	may be defined in other module , and  can be used by use statement.
        So do not be so strict , just leave to hpfcc to search .
4...

	I am tired of explain these , because they are so detail . There are
always some tiny errors like argument type mismatch , argument sequence
error .
	If I explain every tiny changes , it will be tedious .

	Please refer to the Attachment .

	Let 's work as following : first merge basicop , then *.c file in
 hpf2dep and  *.y at last . When merge the *.y ,first merge my part of change,
after that , fD.y  and other pepole's change . Because most of the changes 
were done by me in f90.y , it's about 55 places .

	In my opinion the fast method to the work is , after HIT's change ,
we merge our work to it . our change are will signed , using comments ,like:

	/*  zheng.gb */
	/*  Yanmi   */
	/* Feng Xiaobing   */
	/* wzl */
	/* LY   */

	search the place and compare with the 1.20 , see if you have do the
same work , if not add our changes ,or leave to us to add . After your 
change , I will examine it thoroughly . This is a best way to do our work ,
do you agree ? 

> If you have any problem, please let me know as soon as posible, developing such
> a big project over such long distance by three partners, immediate and accurate
> understanding each other is most important.
> 
> Waiting for your comments.
> 
> Guansong
> 
> 
> 

***************************************************************************
*     Zheng Gengbin                 *                                     *
*                                   *                                     *
*  Dept. of Computer Science        *  Phone:  86-10-2585088              *
*         & Technology              *  Email:                             *
*                                   *      [email-masked]   *
*  Peking University P.R.China      *  Mail:                              *
*                                   *      Room 1077 ,Building 47,        *
*                                   *      Peking University, P.R.China   *
***************************************************************************
Please notice !

Modification made by
		Zheng Gengbin

all commented by  using    /*   by zheng.gb   */

in  f90.y
*********   BFN:   **********

%part_ref1
%part_ref
			1. if failed to lookupSymbField, continue anyway.
				because the type may be accessible in use 
				association.

%action_stmt:
			1. add end_do_stmt  this means label_do_stmt
%label_do_stmt
			1. name return a string not a PTR_SYMB
%nonlabel_do_stmt
			1. name return a string not a PTR_SYMB
%loop_control:
			1. do_variable return a llnd node instead of symbol node
%end_do_stmt:
			1. check if the construct name is declared in do_stmt
%label_end_do_stmt:		/* new !!*/
			1. check if the construct name is declared in do_stmt
			2. check if the label matched
			3. check if control parent is for_node

%assign_goto_stmt
			1. name return a string not a PTR_SYMB
%label_list
			1. label return with PTR_LLND , not PTR_LABEL

%forall_script_control      (forall_stmt)
			1. name return a string ,not a PTR_SYMB

%array_section_element_funcref 
			1. SUB_STRING instead of ARRAY_REF
%substring_range
			1. miss RANGE_OP llnd node

%array_constructor
			1. miss CONSTRUCTOR_REF LLND node.

%function_stmt
			1. give function type using I-N rule.
%dummy_arg
			1. // cancel call makeSymbVar use decl=0
			2. MULTIPLY                   NEW !!!
			3. // cancel assign NULL to id_list .   NEW !!!
			4. assign type to var                   NEW !!!

%generic_spec
			1. makeSymb() does not allow mutiple declared 
				generic_spec assign name =
%operator
			1. same as generic_spec when declare defined_operator

%ac_implied_do_control
			1. misuse set_ll_list , wrongly construct llnd tree.
%ac_implied_do_var
			1. ac_implied_do_var  need not lookupSym by using
				makeSymbVar, this may cause error. i
				ac_implied_do_var must be a new symbol

%component_attr_spec
			1. POINTER_BIT instead of PARAMETER_BIT
			2. POINTER_OP   instead of PARAMETER_OP

%goto_stmt
			1. misplace the label in function makeGotoBfnd

%comblock
			1. common block name should be a global name.

%if_then_stmt
			1. name return a string ,not a PTR_SYMB
%else_if_stmt
			1. name return a string ,not a PTR_SYMB
			2. check if the construct name match
%else_stmt
			1. name return a string ,not a PTR_SYMB
			2. forget to record name information.
%end_if_stmt
			1. name return a string ,not a PTR_SYMB
			2. check if the construct name match
			3. forget to record name information.

%case_stmt
			1. name return a string ,not a PTR_SYMB
			2. check if name is redeclared .
%end_select_stmt
			1. lost construct name 
			2. check if construct name match case_stmt
%case_selector
			1.  change the DEFAULT expression

%cycle_stmt
			1. name return a string ,not a PTR_SYMB

%where_stmt 
			1. add where_stmt_begin
%where_stmt_begin     /* new */
			1. add where_stmt_begin in order to prevend the bfnd 
				thread from inverting.

%elsewhere_stmt
			1. forget to make a CONTROL_END bfnd.

%if_stmt
			1. add if_stmt_begin
%if_stmt_begin	     /* new */
			1. add if_stmt_begin in order to prevend the bfnd thread
				from inverting.

%assumed_size_spec
			1. EXPR_LIST is wrongly made. should append q at the
				end of explicit_shape_spec_list

%main_program
			1. add  null_program_stmt
			2. judge if is unexpected end of program .
%null_program_stmt	/* new */
			1. create makeSymbUnithead in this BNF instead in 
				makeMain_l, which cause thread invert.

%char_length
			1. miss int_literal_constant information.

	(for T_KIND )
%length_selector
%kind_param
			1. give INT_VAL a global_int type;
			2. make a VAR_REF instead STRING_VAL llnd node

%real_literal_constant
%logical_literal_constant
%char_literal_constant
%int_literal_constant
			1. create corresponding T_KIND type for constant ,
				if kind_param occures

%label1:   		
			1. check if a label is redeclared .

%opt_label1
		  	1. cur_label_no

%pointer_stmt				NEW !!!
			1. ARRAY_REF => VAR_REF
			2. if not array then do not call makeTypeArray
%pointer_object				NEW !!!
			1. must be variable name , not variable !
			2. or structure_componnent

%stop_code				NEW !!!
			1. name must return LLND.

%align_dummy				NEW !!!     in fD.y
			1. only name variable allowed !
			2. align_dummy is a dummy variable, allow redeclared. 

%forall_stmt				NEW !!!
			1. abnormal bfnd sequence .
%forall_stmt_begin      		NEW !!!   new add 
			1. abnormal bfnd sequence .

%structure_constructor
			1. makeTypederivedref return PTR_TYPE , not PTR_SYMB

*********   functions  **********

exec_part.c:    lnkStmt()
			1. assign to the wrong label in BFND
			2. add newStmt->variant!= DO_WHILE_NODE
			3. add return value  .     NEW !!!
		makeElseBranch()
			1. create a redundent CONTROL_END
		inLblStack():
			1. this procedure  causes dead lock !
		findBlob()
			1. if bfnd in else block , cannot be found then !

makespec.c :    makeEntity_ll()
			1. donot change the global variable vartype.
			2. add combinedFlag_g     .  NEW !!!
			3. substitute make_type_node by modify_type_len. NEW!!!
		makeTypederivedref()
			1. if can not find derived type in current scope ,create
				 a DEFAULT one
				instead , we will check it later.
		makeSymbConst()
			1. set CONST_NAME to make sure.
		makeTypespec_ll()
			1. make T_KIND.
		modify_type_len()
			1. this is newly added !
		makeMain_ll()				NEW !!!

maketype.c
		look_up_type()
			1. wrongly search type name without using scope

makelabel.c
		make_label()
			1. set this_scope  cur_scope()

b1 , b4 , b8 ,g2 , g3 ,g6, g9, z1, z2, z4 ,z7, z9