Proving properties of Snobol4 patterns: Selecting the assertion format

  • Morris M. Siegel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 167)


Classic Hoare logic has been very successful for proving properties of programs in conventional, imperative languages. Adapting it to a non-imperative environment, which has not been tried much, can provide new insight into the method of axiomatic semantics as well as into the specific new area of application.

This paper presents two surprising results derived merely from the adaptation of the Hoare assertion {P}S {Q} to a logic for proving properites of Snobol4 patterns: (1) selecting just the right assertion format sometimes is highly non-trivial and requires careful analysis, since the choice has a fundamental influence on the final logic; and (2) a certain amount of inexpressiveness (normally considered undesirable) may deliberately be chosen in order to simplify the logic. Our main analytic tool, in selecting "the" correct assertion format from among the many plausible alternatives, is to require that patterns with different properties be "assertionally separable" — i.e., there must be an assertion true for one pattern but false for the other.


Pattern Match Inference Rule Separability Criterion Total Behavior Proof Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1. [Gim 73]
    Gimpel, James F. "A Theory of Discrete Patterns and Their Implementation in SNOBOL4", Comm. ACM 16, 2 (Feb. 1973), 91–100.Google Scholar
  2. 2. [Gim 75]
    —. "Nonlinear Pattern Theory". Acta Informatica 4 (1975), 213–229.Google Scholar
  3. 3. [Gim 76]
    —. Algorithms in SNOBOL4. John Wiley & Sons, New York, 1976.Google Scholar
  4. 4. [GPP 71]
    Griswold, R. E., J. F. Poage, and I. P. Polonsky. The SNOBOL4 Programming Language (2nd ed.). Prentice-Hall, Englewood Cliffs, N. J., 1971.Google Scholar
  5. 5. [Hoa 69]
    Hoare, C. A. R. "An Axiomatic Basis for Computer Programming". Comm. ACM 12, 10 (Oct. 1969), 576–580.CrossRefGoogle Scholar
  6. 6. [LG 78]
    Lutz, Peter H., and Narain Gehani. "An Axiomatic Definition of Pattern Matching in SNOBOL4: Preliminary Findings", Technical report, Computer Science Department, State University of New York at Buffalo, Amherst, N. Y., Jan. 1978.Google Scholar
  7. 7. [Ten 73a]
    Tennent, Robert D. "Mathematical Semantics of SNOBOL4". Conference Record of [the First] ACM Symposium on Principles of Programming Languages (held in Boston, Oct. 1973), 95–107.Google Scholar
  8. 8. [Ten 73b]
    —. "Mathematical Semantics and Design of Programming Languages", Technical Report 59, Department of Computer Science, University of Toronto, Sept. 1973.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1984

Authors and Affiliations

  • Morris M. Siegel
    • 1
  1. 1.Dept. of Computer ScienceQueens College of CUNYFlushingUSA

Personalised recommendations