From: Lynn McGuire on
> Colin has it right. The generated .mod file (a corresponding .f90 file
> is also created but that's just for human convenience) is placed (and
> looked for) in the folder that other .mod files go, which can be
> specified by the /module option. In a Visual Studio project, this is by
> default the "intermediate" directory, usually named Debug or Release.

Cool ! Into the debug or release directory is what I wanted
to know. That way I dont have to modify the code myself.

Thanks,
Lynn
From: analyst41 on
On Feb 4, 6:44 am, glen herrmannsfeldt <g...(a)ugcs.caltech.edu> wrote:
> analys...(a)hotmail.com <analys...(a)hotmail.com> wrote:
>
> (snip)
>
> > I am sure the these two are easy to write in Fortran
> > (1) Recognize lines that start a sub-program declaration
> > (2) extract the number and names of arguments
>
> Well, you also want the type of the arguments, which requires
> much more parsing.  There is also the complication of continuation
> lines.  
>
> > You then have to keep reading lines until the first exceutable
> > statement (is that easy, may be not).
> > Is it going to be very hard to see what rank and type has been
> > declared for each argument?
> > Perhaps - but still a lot easier than an entire compiler, I think.
>
> Most of the front end of a compiler is tokenizing and parsing.
> Many of the complications of non-significant blanks in fixed format
> go away in free format.  
>
>       REALFUN
>      *CTIONX(A,B)
>       INT
>      *EGERA
>       COMPLE
>      *XB
>       X=A+AIMAG(B)
>       RETURN
>       END
>
>   X=&
>   SUBROUTINE(C,D)
>
> -- glen

But the original poster's problem is a special case

(1) It already compiles with an f77 compiler - in fact the checker can
work on some kind of pretty output - a listing file for example.

(2) The argument mismatch checker can use this fact plus whatever else
is known about the source code style (for example - (always
"SUBROUTINE" instead of "subroutine" etc.).
From: Ira Baxter on

"glen herrmannsfeldt" <gah(a)ugcs.caltech.edu> wrote in message
news:hkebvk$8f0$1(a)naig.caltech.edu...
> analyst41(a)hotmail.com <analyst41(a)hotmail.com> wrote:
> (snip)
>
>> I am sure the these two are easy to write in Fortran
>>
>> (1) Recognize lines that start a sub-program declaration
>
>> (2) extract the number and names of arguments
>
> Well, you also want the type of the arguments, which requires
> much more parsing. There is also the complication of continuation
> lines.
>
>> You then have to keep reading lines until the first exceutable
>> statement (is that easy, may be not).
>
>> Is it going to be very hard to see what rank and type has been
>> declared for each argument?
>
>> Perhaps - but still a lot easier than an entire compiler, I think.
>
> Most of the front end of a compiler is tokenizing and parsing.
> Many of the complications of non-significant blanks in fixed format

No. Tokenizing and parsing are relatively easy. What's hard is
collecting name and type information according to the language rules.
This is always messier than you'd think.

Further, suggestions that you can hack an information collector
("easy to write in Fortran")
will run aground all the complications and dark corners
(blanks, continuation lines, strange comments, ...) and
furthermore produce a lot of false positives. When dealing
with large artifacts, you have to minimize false positives,
or you will spend all your time looking at non-problems.

What you need is a tool for implementing custom analyzers.
The DMS Software Reengineering Toolkit is such a tool,
and it has F77 and F90 front ends.
See http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html.


--
Ira Baxter, CTO
www.semanticdesigns.com


From: William Clodius on
Lynn McGuire <lmc(a)winsim.com> wrote:

> Is there some way that I can verify our argument call
> counts and argument types ? We are locked into a F77
> compiler because of some zero initialization problems
> that we have not been able to find. We have 650,000
> lines of f77 code in about 5,000 files with probably
> 6,000 subroutines and functions.
>
> Thanks,
> Lynn
Check out the tools listed at
<http://www.dmoz.org/Computers/Programming/Languages/Fortran/Tools/Code_
Analysis/>

--
Bill Clodius
los the lost and net the pet to email
From: robin on
"glen herrmannsfeldt" <gah(a)ugcs.caltech.edu> wrote in message news:hkebvk$8f0$1(a)naig.caltech.edu...
| analyst41(a)hotmail.com <analyst41(a)hotmail.com> wrote:
| (snip)
|
| > I am sure the these two are easy to write in Fortran
|
| > (1) Recognize lines that start a sub-program declaration
|
| > (2) extract the number and names of arguments
|
| Well, you also want the type of the arguments, which requires
| much more parsing.

Read what he wrote. That's what he said.

| There is also the complication of continuation
| lines.

That's trivial.

| > You then have to keep reading lines until the first exceutable
| > statement (is that easy, may be not).
|
| > Is it going to be very hard to see what rank and type has been
| > declared for each argument?
|
| > Perhaps - but still a lot easier than an entire compiler, I think.
|
| Most of the front end of a compiler is tokenizing and parsing.
| Many of the complications of non-significant blanks in fixed format
| go away in free format.

That's well known. Statement identification parsers for fixed format
have been published since the 1960s.

| REALFUN
| *CTIONX(A,B)
| INT
| *EGERA
| COMPLE
| *XB
| X=A+AIMAG(B)
| RETURN
| END
|
| X=&
| SUBROUTINE(C,D)


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: managing identities
Next: Call Tree Generator