TL;DR: This chapter describes a new technique for automatic selection of appropriate data representations during compile time for programs with omitted declarations and presents an efficient data representation selection algorithm, whose complexity is comparable with those of the fastest known general data-flow algorithms of Tarjan and Reif.
Abstract: Publisher Summary This chapter highlights an automatic technique for selection of data representations in SETL programs. SETL is a very-high-level programming language supporting set-theoretic syntax and semantics. It allows algorithms to be programmed rapidly and succinctly without requiring data-structure declarations to be supplied. The chapter describes a new technique for automatic selection of appropriate data representations during compile time for programs with omitted declarations. It also presents an efficient data representation selection algorithm, whose complexity is comparable with those of the fastest known general data-flow algorithms of Tarjan and Reif. The level of a programming language is determined by the power of its semantic primitives, which influence the ease and speed of programming in the language profoundly. The chapter also describes how the SETL compiler chooses data structure implementations. SETL supports logical quantifiers and the abstract data type set as the prominent high-level features of the language. Programmers are intended to use these features as much as possible and leave more specific data structure and control structure decisions to the SETL compiler. Most other very high-level languages start by incorporating these same features. SETL is a very-high-level programming language supporting set-theoretic syntax and semantics. It allows algorithms to be programmed rapidly and succinctly without requiring data-structure declarations to be supplied. Such declarations can be manually specified later, without recoding the program, to improve the efficiency of program execution. We describe a new technique for automatic selection of appropriate data representations during compile time for programs with omitted declarations and present an efficient data representation selection algorithm, whose complexity is comparable with those of the fastest known general data-flow algorithms of Tarjan and Reif.
TL;DR: The facilities provided by the representation sublanguage and the run-time data structures that it can generate are described and a heuristic which uses some of the methods of global program analysis and which should be capable of selecting an acceptably efficient representation automatically is given.
Abstract: “Pure” SETL is a language of very high level allowing algorithms to be programmed rapidly and succintly. SETL's representation sublanguage adds a system of declarations which allow the user of the language to control the data structures that will be used to implement an algorithm which has already been written in pure SETL, so as to improve its efficiency. Ideally no rewriting of the algorithm should be necessary. The facilities provided by the representation sublanguage and the run-time data structures that it can generate are described; based on this a heuristic which uses some of the methods of global program analysis and which should be capable of selecting an acceptably efficient representation automatically is given.
TL;DR: Techniques for the logical analysis and optimization of SETL programs are set forth, which allow relations of inclusion and membership to be established, the domains and ranges of mappings to be estimated from above and below, and the singlevaluedness of (tabulated) mappingsto be proved.
Abstract: SETL is a set-theoretically oriented language of very high level whose repertoire of semantic objects includes finite sets, ordered n-tuples, and sets of ordered n-tuples useable as mappings. This paper sets forth techniques for the logical analysis and optimization of SETL programs. The techniques described allow relations of inclusion and membership to be established, the domains and ranges of (tabulated) mappings to be estimated from above and below, and the singlevaluedness of (tabulated) mappings to be proved. Once facts of this kind have been established, automatic choice of data structures becomes possible. The methods employed are based upon, and extend, known techniques of data-flow analysis.
TL;DR: The structure of an existing optimizer for the very high-level, set theoretically oriented programming language SETL is described, and its capabilities are illustrated.
Abstract: The structure of an existing optimizer for the very high-level, set theoretically oriented programming language SETL is described, and its capabilities are illustrated. The use of novel techniques (supported by state-of-the-art interprocedural program analysis methods) enables the optimizer to accomplish various sophisticated optimizations, the most significant of which are the automatic selection of data representations and the systematic elimination of superfluous copying operations. These techniques allow quite sophisticated data-structure choices to be made automatically.