An algebra for program fragments

  • Authors:
  • Bent Bruun Kristensen;Ole Lehrmann Madsen;Birger Møller-Pedersen;Kristen Nygaard

  • Affiliations:
  • Department of Computer Science, University of California, Santa Barbara, California;Center for the Study of Language and Information, Stanford University, Stanford, California;Norwegian Computing Center, Osio, Norway;Institute of Informatics, University of Oslo, Oslo, Norway

  • Venue:
  • SLIPE '85 Proceedings of the ACM SIGPLAN 85 symposium on Language issues in programming environments
  • Year:
  • 1985

Quantified Score

Hi-index 0.00

Visualization

Abstract

Program fragments are described either by strings in the concrete syntax or by constructor applications in the abstract syntax. By defining conversions between these forms, both may be intermixed. Program fragments are constructed by terminal and nonterminal symbols from the grammar and by variables having program fragments as values. Basic operations such as valuetransfer, composition and decomposition are defined for program fragments allowing more complicated operations to be implemented. Usual operations such as testing for equality are defined, and in addition more specialized operations such as testing that a program fragment is derivable from another and converting program fragments in concrete form to abstract form are defined. By introducing regular expressions in the grammar these may be used in program fragments in concrete form. By defining constructors for regular expressions these may also be used in program fragments in abstract form.