🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: dla.ai
Article #1

Standard ---> IBM PROLOG translation

#1
From: Mott Given
Date: Fri, 28 Sep 1990 13:44
76 lines
5544 bytes
   This is a program that will translate Edinburgh style PROLOG syntax to
that of IBM PROLOG, to reduce the number of changes you need to make manually.
It will not make all the changes necessary to get your program to run under
MVS IBM PROLOG, so some changes will need to be made manually.  The program is
designed to minimize the number of changes you need to make, so in a few cases
it may make changes that you should not make.  The program was implemented with
a software product called File-AID/SPF which runs on IBM or compatible 
mainframes, using Background File-AID (which allows you to run a batch job
in the background).  The program is not able to completely and correctly 
do the translation as File-Aid does not have the power of tools such the
UNIX package "awk"  (which could be used to implement a similar program if
you do not have File-AID).  For many extralogical predicates, especially
those concerned with I/O, this program only makes part of the changes 
necessary.  IF anyone can think of any suggestions for improvements to the
program, I would be interested in hearing from you.

Mott Given @ Defense Logistics Agency ,DSAC-TMP, P.O. Box 1605,
Bldg. 27  Section 1, Systems Automation Center, Columbus, OH 43216-5002
INTERNET: mgiven@dsac.dla.mil         UUCP:  ...osu-cis!dsac!mgiven
Phone:  614-238-9431    AUTOVON: 850-9431     FAX: 614-238-3214

---------------------- cut here and upload to mainframe --------------------
//NTMPROLO  JOB (USERID,USERDEPT),'IBM PROLOG',CLASS=1,               
// NOTIFY=USERID,MSGLEVEL=(1,1),MSGCLASS=X                           
//STEP1 EXEC PGM=FILEAID                                                
//SYSPRINT   DD  SYSOUT=*                                              
//SYSLIST    DD  SYSOUT=*                                             
//SYSTOTAL   DD  SYSOUT=*                                            
//DD01       DD  DSN=YOUR.PROLOG.CODE(MEMBERNAME),DISP=OLD                    
//SYSIN      DD  *                                                  
$$DD01 UPDATE  REPL=(1,0,X'AD',X'C0'),                             
               REPL=(1,0,X'BD',X'D0'),                            
               REPL=(1,0,X'4F',X'5A'),                           
               REPL=(1,0,C":-",C"<-"),                          
               EA=(1,0,C"% ",C"/* "),                          
               EA=(1,0,C"! &",C"/ & "),                       
               REPL=(1,0,C"& ,",C"& / &"),                   
               EA=(1,0,C", ",C" & "),                       
               REPL=(1,0,C"K",C"!"),                       
               REPL=(1,0,C"'})",C"')"),                   
               REPL=(1,0,C"=<",C"<="),                   
               REPL=(1,0,C"=>",C">="),                  
               REPL=(1,0,C"\==",C"==/"),               
               REPL=(1,0,C"\=",C"=/"),                                 
               EA=(1,0,C"nl, ",C"nl & "),                             
               EA=(1,0,C" !, ",C" / & "),                            
               EA=(1,0,C"!,",C"/ & "),                              
               EA=(1,0,C"),(",C")Z(")                              
               EA=(1,0,C"),",C") & ")                             
               EA=(1,0,C")Z(",C"),(")                            
               REPL=(1,0,C"abolish",C"delax"),                       
               REPL=(1,0,C"assert",C"addax"),                           
               REPL=(1,0,C"asserta",C"addax"),                         
               REPL=(1,0,C"assertz",C"addax"),                        
               REPL=(1,0,C"clause",C"ax"),                           
               REPL=(1,0,C"close",C"dcio"),                         
               REPL=(1,0,C"create",C"dcio"),                       
               REPL=(1,0,C"display",C"writes"),                   
               REPL=(1,0,C"edit",C"ed"),                         
               REPL=(1,0,C"findall",C"compute"),                
               REPL=(1,0,C"functor",C"axn"),                   
               REPL=(1,0,C"halt",C"fin"),                     
               REPL=(1,0,C"integer",C"int"),                 
               REPL=(1,0,C"listing",C"arg"),                
               REPL=(1,0,C"number",C"num"),                            
               REPL=(1,0,C"open",C"dcio"),                            
               REPL=(1,0,C"print",C"writex"),                        
               REPL=(1,0,C"prstln",C"prst"),                        
               REPL=(1,0,C"put(",C"writes('"),                     
               REPL=(1,0,C"readlist",C"readli"),                  
               REPL=(1,0,C"retract",C"delax"),                   
               REPL=(1,0,C"tell",C"dcio"),                      
               REPL=(1,0,C"told",C"dcio"),                     
               REPL=(1,0,C"writeln({",C"writes('")            
//                                                           
Technical Details
Message-ID: <2574@dsacg3.dsac.dla.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!dsac.dla.mil!dsacg3.dsac.dla.mil!ntm1169

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!dsac.dla.mil!dsacg3.dsac.dla.mil!ntm1169
From: ntm1169@dsacg3.dsac.dla.mil (Mott Given)
Newsgroups: dla.ai,comp.lang.prolog
Subject: Standard ---> IBM PROLOG translation
Keywords: translation
Message-ID: <2574@dsacg3.dsac.dla.mil>
Date: 28 Sep 90 13:44:43 GMT
Followup-To: comp.lang.prolog
Organization: Defense Logistics Agency Systems Automation Center, Columbus
Lines: 76