[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Thu May 22 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

86.0. "Macro to Highlevel Language Translator." by SKYLRK::HULL () Fri Apr 04 1986 22:13

        I looking for an internal tool that will perform a translation 
    from Macro-11 or VAX Macro to a high level language such as Pascal or   
    ADA.  
    
    	To date I have been able to locate a reference to an IBM
    environment tool that will translate IBM assembler to PL/1.  The
    tool performs the translation in two steps.  The first step results
    in a "meta code" which is then translated into PL/1.  If anyone
    anyone knows about an internal tool that will do this task I would
    certainly appreciate a response.    
T.RTitleUserPersonal
Name
DateLines
86.1No such beastTLE::BISHOPBWed Apr 09 1986 00:5317
    I doubt such a general translator exists.  The universe of possible
    MACRO programs is larger than the universe of possible Pascal programs
    as there are constructs possible in MACRO that are impossible with
    Pascal (such as two loops which partially overlap, but neither of
    which is nested in the other).  The same is true of ADA and PL/1.
    
    While it might be possible to back-translate (at great effort) the
    output of a simple-minded compiler to the source,  the general case
    is much more difficult.  Back-transating from the output of the
    VAX Pascal compiler, for example, is not easy due to the many peep-hole
    optimizations, as I know from having done so as part of trying to
    answer SPRs on it.  And the VAX Pascal compiler is far less tricky
    a MACRO coder than most humans.
    
    I'm sorry to be the bearer of bad news.
    
    			-John Bishop
86.2still an issue (sigh)VINO::KOMARDeeply IntertwingledMon Oct 07 1991 12:2123
    
    	Five years later, I am looking into "reverse engineering" a body of
    	working VAX Macro (-32) programs.  Eventually they will be written
    	in ANSI C, so that they may run on VAX/VMS, RISC/OSF, and perhaps
    	other things.
    
    	So far, I've glanced at the McCabe "BattleMap" tool, and I've
    	gotten in touch with the last member of the VMS A/D project
    	of the same name as the topic of this note.
    
    	The McCabe Tools parse various languages, then perform various
    	types of analysis.  The will display flow graphs, and call
    	structure, in the form of a structure chart.  Also, it will
    	generate a list of conditions that will cover all of the code at
    	least once.
    
    	Can anyone point me at any other tools that will perform semantic
    	analysis on Macro code, other than code generation?
    
    		Thanks in advance,
    
    		-pk.
    
86.3consider VESTSAUTER::SAUTERJohn SauterMon Oct 07 1991 17:216
    Part of the Alpha effort includes VEST, a tool which analyzes MACRO-32
    (in the form of VAX/VMS images) and generates flowgraphs.  Perhaps you
    could use it as a starting point.  However, keep in mind the advice in
    86.1---it may be impossible to translate a MACRO-32 program into C,
    short of writing a C program which simulates a VAX!
        John Sauter