|
Abstract : |
Abstract: SICStus Prolog is a sequential Prolog implementation built around a version of the Warren Abstract Machine (WAM). For several years, SICStus has supported WAM-to-native code compilation for Sun workstations. This old scheme is neither as portable nor as open to experiments as would be desirable. With the support of my colleagues in the SICStus group, I have developed a new scheme that is more of both and performs slightly better too. Portability enhancement is achieved by introducing a new abstract machine, a fragment of an idealized general-purpose architecture, between the WAM and native code targets. This allows most of the complexity of native code compilation to be in phases containing only wellencapsulated target dependencies. Moreover, it allows the run-time library for native code to be substantially target-independent. For RISC targets, a derivative of the new abstract machine allows quasi-target-independent instruction scheduling to be performed. This paper explains the SICStus approach to native code compilation, presents the new scheme in detail, and evaluates it with respect to portability and performance., |