Journal of Software Maintenance Research and Practice · 1993 · 19 citations · 20 references
ComputingComputer EngineeringComputer ScienceCompilersProgramming LanguagesSoftware EngineeringCode GenerationCompiler ConstructionLogic ProgrammingSoftware ConstructionCode DecompilationCompiler DesignConstraint Logic ProgrammingConstraint-based ProgrammingDebuggingProgram TransformationQuality AssessmentSoftware Maintenance Process
Abstract A compiler may be specified by a description of how each construct of the source language is translated into a sequence of object code instructions. It is possible to produce a compiler prototype almost directly from this specification in the form of a logic program. This defines a relation between allowed high‐level and low‐level program constructs. Normally a high‐level program is supplied as input to a compiler and object code is returned. Because of the declarative nature of a logic program, it is possible for the object code to be supplied and the allowed high‐level programs returned, resulting in a decompiler, provided enough information is available in the object code. This paper discusses the problems of adopting such an approach in practice. A simple compiler and decompiler are presented in full as an example in the logic programming language Prolog, together with some sample output. The possible benefits of using constraint logic programming are also considered. Potential applications include reverse‐engineering in the software maintenance process, verification of safety‐critical object code, quality assessment of code and program debugging tools.
20
The Semantics of Predicate Logic as a Programming Language
M. H. van Emden, Robert Kowalski · Journal of the ACM · 1976 · 1.5K citations · Full text
Humanities, Computer Science, Logic +16
Efficient Induction of Logic Programs
Stephen Muggleton, Cheng Feng · 1990 · 657 citations
Alain Colmerauer · Communications of the ACM · 1990 · 572 citations · Full text
A logical analysis of modules in logic programming
Dale Miller · The Journal of Logic Programming · 1989 · 235 citations