1% BEGIN LICENSE BLOCK 2% Version: CMPL 1.1 3% 4% The contents of this file are subject to the Cisco-style Mozilla Public 5% License Version 1.1 (the "License"); you may not use this file except 6% in compliance with the License. You may obtain a copy of the License 7% at www.eclipse-clp.org/license. 8% 9% Software distributed under the License is distributed on an "AS IS" 10% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11% the License for the specific language governing rights and limitations 12% under the License. 13% 14% The Original Code is The ECLiPSe Constraint Logic Programming System. 15% The Initial Developer of the Original Code is Cisco Systems, Inc. 16% Portions created by the Initial Developer are 17% Copyright (C) 2006 Cisco Systems, Inc. All Rights Reserved. 18% 19% Contributor(s): 20% 21% END LICENSE BLOCK 22 23% File : backwards-sec.tex 24% Date : March 1992 25% Author : Michael Dahmen, Luis Hermosilla 26% Modified by : Luis Hermosilla, August 27% Project : MegaLog-Sepia User Manual 28% Content : Backwards compatibility wrt. MegaLog 29 30\newpage 31 32\chapter{Backwards Compatibility} 33\label{backwards-compat} 34 35\eclipse is backwards compatible to the previous 36MegaLog system with a Prolog part independent of \eclipse. This 37compatibility is achieved by a special module that redefines all 38predicates with conflicting syntax or semantics. 39 40\section{Module {\bf megalog}} 41 42This module 43achieves a very high degree of compatibility, but there are a 44few aspects remaining where minor changes in an application 45may be necessary. 46 47\begin{itemize} 48 49\item{Arithmetic} 50 51The hyperbolic radial functions are missing in \eclipse. The 52expression 53\begin{verbatim} 54?- X is cputime. 55\end{verbatim} 56produces the current time in \eclipse, not the time since the 57last call. However, {\bf cputime/1} and related built-ins 58have the semantics as before. 59 60\item{Asserted Clauses} 61 62The errors generated when asserted clauses are overwritten with compiled 63code or vice versa differ. 64 65\item{Global Variable and Arrays} 66 67The errors generated differ. In general, \eclipse catches more 68errors. 69 70\item{Error Handling} 71 72The error codes are completely different. The compatibility module 73forbids definition of error handlers to prevent undesired effects. 74 75\item{Input and Output} 76 77The difference in argument order is handled by the compatibility module. 78\eclipse does not detect cyclic terms when printing, however by 79default there is a maximal depth and length set. \eclipse does 80not flush after each output. The predicates {\bf set\_io/2}, 81{\bf writeqvar/2} and {\bf writeqvar/3} are not provided. 82 83\item{Object Files} 84 85The capability to generate and load object files is not provided. 86However, there is the capability to generate and load saved states. 87 88\item{String Conversion} 89 90The predicate {\bf term\_string/3} is not provided, however 91{\bf term\_string/2} is. 92 93\item{Environment} 94 95There are different predicates to 96obtain statistics. The on-line editor is not provided. 97 98\item{Structures} 99 100\eclipse does not distinguish structures and lists, i.e.\ where ever 101possible a list is seen as {\bf ./2}. The compatibility module 102redefines {\bf compound/1}, {\bf list/1} and {\bf type\_of/2} to 103achieve the MegaLog semantics. However, {\bf arg/3}, {\bf functor/3} and 104{\bf =../2} are not redefined i.e.\ they generate no errors in cases 105where they did before. 106 107\item{Debugger} 108 109The debugger is different and also some of the predicates that 110control the debugger. 111 112\item{Command Line Options} 113 114\eclipse has different command line options, which are based on the 115Sepia ones. Please refer to the Sepia manual in order to find the 116appropriate replacement. 117 118\end{itemize} 119 120More details can be looked up in the source file of module 121{\bf megalog}, which is extensively documented. 122 123 124\section{Shared Memory Multi User System} 125 126The "shared memory" multi user variant of MegaLog and 127earlier releases of \eclipse is no longer supported. 128 129