• DocumentCode
    2872822
  • Title

    Abstract Interpretation of PIC Programs through Logic Programming

  • Author

    Henriksen, Kim S. ; Gallagher, John P.

  • Author_Institution
    Roskilde University, Denmark
  • fYear
    2006
  • fDate
    Sept. 2006
  • Firstpage
    184
  • Lastpage
    196
  • Abstract
    A logic based general approach to abstract interpretation of low-level machine programs is reported. It is based on modelling the behavior of the machine as a logic program. General purpose program analysis and transformation of logic programs, such as partial evaluation and convex hull analysis, are applied to the logic based model of the machine. A small PIC microcontroller is used as a case study. An emulator for this microcontroller is written in Prolog, and standard programming transformations and analysis techniques are used to specialise this emulator with respect to a given PIC program. The specialised emulator can now be further analysed to gain insight into the given program for the PIC microcontroller. The method describes a general framework for applying abstractions, illustrated here by linear constraints and convex hull analysis, to logic programs. Using these techniques on the specialised PIC emulator, it is possible to obtain constraints on and linear relations between data registers, enabling detection of for instance overflows, branch conditions and so on.
  • Keywords
    Computer science; High level languages; Logic programming; Memory management; Microcontrollers; Performance analysis; Performance evaluation; Performance gain; Programming profession; Software libraries;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Source Code Analysis and Manipulation, 2006. SCAM '06. Sixth IEEE International Workshop on
  • Conference_Location
    Philadelphia, PA, USA
  • Print_ISBN
    0-7695-2353-6
  • Type

    conf

  • DOI
    10.1109/SCAM.2006.1
  • Filename
    4026868