Transformational programming and the paragraph problem (Q1067769)

From MaRDI portal
scientific article
Language Label Description Also known as
English
Transformational programming and the paragraph problem
scientific article

    Statements

    Transformational programming and the paragraph problem (English)
    0 references
    1986
    0 references
    The problem of breaking paragraphs into lines can be formulated as an optimisation problem: the best arrangement of lines is one which minimises a certain definition of waste. Starting with a specification of this kind, we present a complete derivation, based on transformational programming, of two linear-time algorithms for the problem. The difference between the algorithms reflects different assumptions about the algebraic properties of waste functions: one algorithm employs a greedy strategy, while the other uses dynamic programming. Both algorithms are expressed as purely functional programs, and the advantages of a functional notation are illustrated in the derivations.
    0 references
    0 references
    paragraph problem
    0 references
    breaking paragraphs into lines
    0 references
    optimisation problem
    0 references
    transformational programming
    0 references
    waste functions
    0 references
    dynamic programming
    0 references
    functional programs
    0 references
    0 references
    0 references