Subject: Re: Can we do a little more? Re: more words on module file

From: Zheng Gengbing <[email-masked]>
Date: Thu, 27 Jun 1996 08:42:10 +0800 (EAT)

On Wed, 26 Jun 1996, Guansong Zhang wrote:

> On Jun 26,  9:59am, Zheng Gengbing wrote:
> > Subject: Re: more words on module file
> > On Tue, 25 Jun 1996, Guansong Zhang wrote:
> >
> > > On Jun 20,  8:57am, Zheng Gengbing wrote:
> > > > Subject: Re: more words on module file
> > > > On Tue, 18 Jun 1996, Guansong Zhang wrote:
> > > >
> > > >
> > > > > Suppose a special type is defined in a seperate module file. Then
> hpf2dep
> > > will
> > > > > report error if it do not access this file first.
> > > > >
> > > >
> > > > 	I have modified some places to suppress the error report of these:
> > > > 	if a module is not predefined , hpf2dep report error.
> > > >  	Then hpf2dep is ok to hpfsc .
> > > >
> > > >
> > > > Gengbin
> > > >-- End of excerpt from Zheng Gengbing
> > >
> > > Could you please explain more about this in 1.58?
> > >
> > > Guansong
> > >
> >
> >
> > 	I supressed some places concerning the error reporting ,
> > 	such as in makespec.c line 435 , I commented the line:
> >
> > 	err_g("Module must be pred_defined.",lineNum_g,string);
> >
> > 	After this , we actually left more checking work to hpfsc .
> >
> >
> > Gengbin
> >
> >-- End of excerpt from Zheng Gengbing
> 
> 
> What if a type defined in the module file, typically a record is defined in
> module, then the main file is going to define a var of this type and use the
> feild of this var?
> 
> I make a simple test on this:
> 
> for program:
> 
> 
>         Program mm
>         use A
>           type(id) :: license
>       license%name = 'JOHN OLSON'
>       license%ssn = 123456
>         end
> 
> we suppose id is defined in module A in another file:
> 
> Then hpf2dep:
> 
>         /tmp_mnt/home/R4D/zgs/Project/front/syr/frontend/src/hpf2dep/hpf2dep
> module.f9
> ___Your HPF program's dep_file have been written !___
> ___Your HPF program passed!___
> 
> hpfsc:
> 
>         /tmp_mnt/home/R4D/zgs/Project/front/syr/frontend/src/hpfsc/hpfsc
> module.dep
> Could not open A.mod for read
> Loading module file 'A.mod'...
> Could not open A.mod for read
> Preprocessing ...
> Preprocessing done.
> hpfsc: line 1 error 248:Module 'A' have not be defined .
> hpfsc: line 2 error 127:Module name not found !
> hpfsc: line 3 error 206:Derived type 'id' not declared .
> hpfsc: line 4 error 109:Variable: license  nondeclared !
> hpfsc: line 4 error 112:Inavlid record field 'name' !
> hpfsc: line 4 error 235:The type cannot be determined ! .
> hpfsc: line 5 error 109:Variable: license  nondeclared !
> hpfsc: line 5 error 112:Inavlid record field 'ssn' !
> hpfsc: line 5 error 235:The type cannot be determined ! .
> ___Your HPF program's dep_file have been written !___
> 
>  *** hpfsc: Errors detect , no link ***
> 
> (if I use -c option, it will not produce the last line message.)
> 
> Then:
> 
>         /tmp_mnt/home/R4D/zgs/Project/front/syr/frontend/src/tools/unparse/unparse
> module.dep > module.dep.src
> Warning : Error in Unparse, not a type node
> 
> And we can see the unparse result:
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       program mm
>       use A
>       default:: license
>       license%name = 'JOHN OLSON'
>       license%ssn = 123456
>       end program
> 
> 
> ======================================
> 
> 
> >From above we can see without global checking, hpfsc also can decide that the
> default type is type(id), but it do not change the dep to let unparse pass this
> file.
> 
> I do not understand how you design the hpfsc on this. I remember previously we
> talk about this default type problem. Could you please explain this once more?
> 
> Why hpf2dep have to use a default type, and why hpfsc do not change it when it
> can?
> 
> 
> Guansong
> 

	Since this sample use the module A , so a.mod must present if to 
compile this file . You can see during the compilation of hpfsc , it reported
the error .
	In fact , we should quit the compilation of hpfsc immediately or donot
produce the dep at all , but now we produced the dep for testing .
	So , you should not expect the chance to unparse this dep with errors
in the future.

Gengbin

---

From: Zheng Gengbing <[email-masked]>
Date: Fri, 5 Jul 1996 11:05:56 +0800 (EAT)

Hi ,

	To keep our work update , now version 1.60 is ready for your comments.

	semantics sample files in Testsuite are rearranged ,
	the prefix :
	 spec_   stands for specification part test ,
         exec_   stands for execution part test,
         io_     stands for IO part test
         hpf_    stands for HPF extension test . 

	f90.y is modified a little to correct a def bug of rule . The main
changes are in dir hpfsc . Now 2 extra command options are added :
	-V  : verbose display of the progress
	-l  : generate .log files for every file .       

	In order to transfer our big project , I delete all the .rec files
in testsuite . Hope that will help.

Gengbin