Offline specialisation in Prolog using a hand-written compiler generator

被引:18
|
作者
Leuschel, M [1 ]
Jorgensen, J
Vanhoof, W
Bruynooghe, M
机构
[1] Univ Southampton, Dept Comp Sci, DSSE, Highfield SO17 1BJ, England
[2] Royal Vet & Agr Univ, Dept Math & Phys, DK-1871 Frederiksberg C, Denmark
[3] Katholieke Univ Leuven, Dept Comp Sci, B-3001 Heverlee, Belgium
关键词
partial evaluation; partial deduction; program specialisation; compiler generation; abstract interpretation;
D O I
10.1017/S1471068403001662
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The so called "cogen approach" to program specialisation, writing a compiler generator instead of a specialiser, has been used with considerable success in partial evaluation of both functional and imperative languages. This paper demonstrates that the cogen approach is also applicable to the specialisation of logic programs (called partial deduction) and leads to effective specialisers. Moreover, using good binding-time annotations, the speed-ups of the specialised programs are comparable to the speed-ups obtained with online specialisers. The paper first develops a generic approach to offline partial deduction and then a specific offline partial deduction method, leading to the offline system LIX for pure logic programs. While this is a usable specialiser by itself, it is used to develop the cogen System LOGEN. Given a program, a specification of what inputs will be static, and an annotation specifying which calls should be unfolded, LOGEN generates a specialised specialiser for the program at hand. Running this specialiser with particular values for the static inputs results in the specialised program. While this requires two steps instead of one, the efficiency of the specialisation process is improved in situations where the same program is specialised multiple times. The paper also presents and evaluates an automatic binding-time analysis that is able to derive the annotations. While the derived annotations are still suboptimal compared to hand-crafted ones, they enable nonexpert users to use the LOGEN system in a fully automated way. Finally, LOGEN is extended so as to directly support a large part of Prolog's declarative and non-declarative features and so as to be able to perform so called mixline specialisations.
引用
收藏
页码:139 / 191
页数:53
相关论文
共 50 条
  • [1] offline Hand-Written Musical Symbol Recognition
    Chanda, Sukalpa
    Das, Debleena
    Pal, Umapada
    Kimura, Fumitaka
    [J]. 2014 14TH INTERNATIONAL CONFERENCE ON FRONTIERS IN HANDWRITING RECOGNITION (ICFHR), 2014, : 405 - 410
  • [2] Research on offline recognition of Chinese hand-written characters
    Zhao Lixin
    Wang Jianping
    Zhang Yong
    Chen Keqiong
    [J]. PROCEEDINGS OF THE FIFTH INTERNATIONAL SYMPOSIUM ON TEST AUTOMATION & INSTRUMENTATION, VOLS 1 AND 2, 2014, : 278 - 285
  • [3] A COMPILER WRITTEN IN PROLOG
    EDGAR, GA
    [J]. DR DOBBS JOURNAL, 1985, 10 (05): : 84 - &
  • [4] A Novel Architecture to verify Offline Hand-written Signatures using Convolutional Neural Network
    Alkaabi, Sultan
    Yussof, Salman
    Almulla, Sameera
    Al-Khateeb, Haider
    AAlAbdulsalam, Abdulrahman
    [J]. 2019 INTERNATIONAL CONFERENCE ON INNOVATION AND INTELLIGENCE FOR INFORMATICS, COMPUTING, AND TECHNOLOGIES (3ICT), 2019,
  • [5] An approach to electronization of hand-written patient records - Scanned hand-written chart
    Nagira, M
    Tsumoto, S
    [J]. MEDINFO 2001: PROCEEDINGS OF THE 10TH WORLD CONGRESS ON MEDICAL INFORMATICS, PTS 1 AND 2, 2001, 84 : 788 - 788
  • [6] A COMPILER WRITTEN IN PROLOG - THE VEDA EXPERIENCE
    MONIN, JF
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1989, 348 : 119 - 131
  • [7] RECOGNITION OF HAND-WRITTEN CHARACTERS USING THE DAP.
    Pecht, Josef
    Ramm, Isa
    [J]. ICL technical journal, 1982, 3 (02): : 199 - 217
  • [8] Hand-written character recognition using layered abduction
    Fox, Richard
    Hartmann, William
    [J]. ADVANCES IN SYSTEMS, COMPUTING SCIENCES AND SOFTWARE ENGINEERING, 2006, : 141 - +
  • [9] COMPUTER RECOGNITION OF HAND-WRITTEN CHARACTERS USING THE DISTANCE TRANSFORM
    KOVACS, ZM
    GUERRIERI, R
    [J]. ELECTRONICS LETTERS, 1992, 28 (19) : 1825 - 1827
  • [10] Recognizing hand-written digits using hierarchical products of experts
    Mayraz, G
    Hinton, GE
    [J]. ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 13, 2001, 13 : 953 - 959