dymm@b.cs.wvu.wvnet.edu (David Dymm) (01/03/90)
I am looking for a utility to help in the documentation of C code. Input: Multiple 'C' files. Output: A cross reference report showing the call hierarchy of all functions. Thus, the report might be in the form of a tree where each function is listed showing from where it is called and perhaps how many times it is called. David Dymm Project Manager USMAIL: Bell Atlantic Knowledge Systems, 145 Fayette Street, Morgantown, WV 26505 PHONE: 304 291-2651 (8:30-4:30 EST) USENET: {allegra,bellcore, cadre,idis,psuvax1}!pitt!wvucsb!dymm INTERNET: dymm@b.cs.wvu.wvnet.edu
rusty@cadnetix.COM (Rusty Carruth) (01/04/90)
In article <625@h.cs.wvu.wvnet.edu> dymm@b.cs.wvu.wvnet.edu (David Dymm) writes: > >I am looking for a utility to help in the documentation of C code. > >Input: Multiple 'C' files. > >Output: A cross reference report showing the call hierarchy of > all functions. >... >David Dymm Well, this will probably not help as much as I would like, but there is a program available for the PC family which does pretty-printing and such, and also can create the tree info you wanted. I THINK it was by Polytron, but I could be wrong. I'll try to find out and post again. If anyone else knows of the actual company name, you might be really lucky and that company may have ported it to unix by now... Sorry to not be more specific, I'll try to do better tomorrow! ---Join the usenet un-net, 28.410 and/or 28.390(+-) 1700Z to 1900Z saturdays! Rusty Carruth. Radio: N7IKQ ^^ or later :-) DOMAIN: rusty@cadnetix.com UUCP:{uunet,boulder}!cadnetix!rusty home: POB. 461, Lafayette CO 80026
erc@khijol.UUCP (Edwin R. Carp) (01/04/90)
In article <625@h.cs.wvu.wvnet.edu> dymm@b.cs.wvu.wvnet.edu (David Dymm) writes: > >I am looking for a utility to help in the documentation of C code. Have you tried "cflow"? -- --------------------------- discard all after this line ----------------------- Ed Carp N7EKG/5 (28.3-28.5) uunet!cs.utexas.edu!khijol!erc "Good tea. Nice house." -- Worf
jimr@hp-lsd.COS.HP.COM (Jim Rogers) (01/04/90)
/ hp-lsd:comp.unix.questions / dymm@b.cs.wvu.wvnet.edu (David Dymm) / 4:22 pm Jan 2, 1990 / >I am looking for a utility to help in the documentation of C code. > >Input: Multiple 'C' files. > >Output: A cross reference report showing the call hierarchy of > all functions. > Thus, the report might be in the form of a tree where > each function is listed showing from where it is called > and perhaps how many times it is called. On Sys V systems there is a utility called "cflow" which will take a collection of C, YACC, LEX, assembler, and object files and builds a graph charting the external references. This will probably meet most of your needs for static analysis of your code. When you ask to show how many times a function is called then you are jumping into the world of dynamic analysis. Dynamic analysis allows you to trace the actual execution of your program. There are many forms of dynamic analysis including branch flow analysis and path flow analysis. The common factor in all dynamic analysis is that the results obtained are completely dependant upon the data fed to the program. Most dynamic analysis is used to determine test coverage. If a test suite covers all the possible conditions your code can encounter then you should get 100% coverage, with some functions being called many times. If your test suite omits some conditions or combinations of conditions then you may find that some of your functions or branches may not have been tested. Static analysis is useful for documentation. Dynamic analysis is useful for test design and verification. Jim Rogers Hewlett-Packard Logic Systems Division Colorado Springs, Colorado
mike@raven.USS.TEK.COM (Mike Ewan) (01/10/90)
In article <10761@cadnetix.COM> rusty@cadnetix.COM (Rusty Carruth) writes: >In article <625@h.cs.wvu.wvnet.edu> dymm@b.cs.wvu.wvnet.edu (David Dymm) writes: >> >>I am looking for a utility to help in the documentation of C code. >>[...] > >Well, this will probably not help as much as I would like, but there >is a program available for the PC family which does pretty-printing >and such, and also can create the tree info you wanted. I THINK >it was by Polytron, but I could be wrong. I'll try to find out >and post again. If anyone else knows of the actual company name, >you might be really lucky and that company may have ported it to >unix by now... The company is Sage/Polytron, 1100 nw 167th Pl, Beaverton OR 97006 (503) 645-1150 I havn't used their PolyDoc product but have used their PVCS (RCS clone). I'm pleased with the product. They have been porting some of the products to Unix. If PolyDoc isn't ported you could always download to a PC run the thing and then up load. -- Michael Ewan (503)627-6468 Internet: mike@raven.USS.TEK.COM Unix Systems Support UUCP: ...!tektronix!puffin!raven!mike Tektronix, Inc. Compuserv: 73747,2304 "Fig Newton: The force required to accelerate a fig 39.37 inches/sec."--J. Hart
rembo@uts.amdahl.com (Tony Rems) (01/10/90)
In article <625@h.cs.wvu.wvnet.edu> dymm@b.cs.wvu.wvnet.edu (David Dymm) writes: > >I am looking for a utility to help in the documentation of C code. > >Input: Multiple 'C' files. > >Output: A cross reference report showing the call hierarchy of > all functions. > Thus, the report might be in the form of a tree where > each function is listed showing from where it is called > and perhaps how many times it is called. > > >David Dymm Project Manager > >USMAIL: Bell Atlantic Knowledge Systems, > 145 Fayette Street, Morgantown, WV 26505 >PHONE: 304 291-2651 (8:30-4:30 EST) >USENET: {allegra,bellcore, cadre,idis,psuvax1}!pitt!wvucsb!dymm >INTERNET: dymm@b.cs.wvu.wvnet.edu There is a set of tools from McCabe & Associates called Battlemap, ACT & the Inference Engine. These tools are designed to measure complexity of C code (as well as code in other languages) and it runs under UNIX on Sun and a few other platforms. It can produce the calling structure of a pieced of code as well as the internal structure of the code. It can produce a report or a graph (or both) and using the inference engine it produce cross reference information on the internal structure of the code - including called-bys called-from calls-to and number of calls. Although, I found it rather limited in its capacity as a test tool - which was its purpose, it sounds like it might suit your purposes. If you'd like any more info, send me some e-mail. -Tony