z-logo
Premium
A specification schema for indenting programs
Author(s) -
Mateti Prabhaker
Publication year - 1983
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380130206
Subject(s) - computer science , programming language , pascal (unit) , modular programming , schema (genetic algorithms) , theoretical computer science , information retrieval
A two level specification of the functional behaviour of a class of indenting programs for Pascal is presented. The transformation that these programs perform on the input text is a composition of splitting input lines, altering the blank space between lexical tokens and computing the margin required in front of each of the split lines. The high level specification is given as a stylized Pascal grammar in Extended BNF. In contrast, the low level specifications, which are operationally closer to a program, and which define how syntactically invalid text is dealt with, require several mathematical functions that capture the essence of these basic transformations. The specifications of an indenting program for Pascal are then obtained as a further elaboration of these functions. Most indentation styles appearing in the literature can be specified with precision using methods developed in this paper. Our experience in this case study indicates that although specifications for real‐life programs can be given using simple mathematics, the effort required is still considerable.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here