Automatic Static Cost Analysis for Parallel Programs

被引:38
|
作者
Hoffmann, Jan [1 ]
Shao, Zhong [1 ]
机构
[1] Yale Univ, New Haven, CT 06520 USA
来源
关键词
Functional Programming; Static Analysis; Resource Consumption; Amortized Analysis; AMORTIZED RESOURCE ANALYSIS; USAGE; TIME;
D O I
10.1007/978-3-662-46669-8_6
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Static analysis of the evaluation cost of programs is an extensively studied problem that has many important applications. However, most automatic methods for static cost analysis are limited to sequential evaluation while programs are increasingly evaluated on modern multicore and multiprocessor hardware. This article introduces the first automatic analysis for deriving bounds on the worst-case evaluation cost of parallel first-order functional programs. The analysis is performed by a novel type system for amortized resource analysis. The main innovation is a technique that separates the reasoning about sizes of data structures and evaluation cost within the same framework. The cost semantics of parallel programs is based on call-by-value evaluation and the standard cost measures work and depth. A soundness proof of the type system establishes the correctness of the derived cost bounds with respect to the cost semantics. The derived bounds are multivariate resource polynomials which depend on the sizes of the arguments of a function. Type inference can be reduced to linear programming and is fully automatic. A prototype implementation of the analysis system has been developed to experimentally evaluate the effectiveness of the approach. The experiments show that the analysis infers bounds for realistic example programs such as quick sort for lists of lists, matrix multiplication, and an implementation of sets with lists. The derived bounds are often asymptotically tight and the constant factors are close to the optimal ones.
引用
收藏
页码:132 / 157
页数:26
相关论文
共 50 条
  • [1] Towards a General Framework for Static Cost Analysis of Parallel Logic Programs
    Klemen, Maximiliano
    Lopez-Garcia, Pedro
    Gallagher, John P.
    Morales, Jose F.
    Hermenegildo, Manuel, V
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (306): : 238 - 240
  • [2] PARALLEL ALGORITHMS AND STATIC ANALYSIS OF PARALLEL PROGRAMS
    MIRENKOV, NN
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1987, 269 : 48 - 59
  • [3] A PRACTICAL ALGORITHM FOR STATIC ANALYSIS OF PARALLEL PROGRAMS
    MCDOWELL, CE
    [J]. JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 1989, 6 (03) : 515 - 536
  • [4] Automatic Complexity Analysis of Explicitly Parallel Programs
    Hoefler, Torsten
    Kwasniewski, Grzegorz
    [J]. PROCEEDINGS OF THE 26TH ACM SYMPOSIUM ON PARALLELISM IN ALGORITHMS AND ARCHITECTURES (SPAA'14), 2014, : 226 - 235
  • [5] Automatic Cost Analysis for Imperative BSP Programs
    Jakobsson, Arvid
    [J]. INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2019, 47 (02) : 184 - 212
  • [6] Automatic Cost Analysis for Imperative BSP Programs
    Arvid Jakobsson
    [J]. International Journal of Parallel Programming, 2019, 47 : 184 - 212
  • [7] STATIC ANALYSIS OF BARRIER SYNCHRONIZATION IN EXPLICITLY PARALLEL PROGRAMS
    JEREMIASSEN, TE
    EGGERS, SJ
    [J]. PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES, 1994, 50 : 171 - 180
  • [8] Knowledge-based automatic performance analysis of parallel programs
    Espinosa, A
    Margalef, T
    Luque, E
    [J]. PARALLEL COMPUTING: FUNDAMENTALS, APPLICATIONS AND NEW DIRECTIONS, 1998, 12 : 697 - 700
  • [9] KOJAK - A tool set for automatic performance analysis of parallel programs
    Mohr, B
    Wolf, F
    [J]. EURO-PAR 2003 PARALLEL PROCESSING, PROCEEDINGS, 2003, 2790 : 1301 - 1304
  • [10] Static Analysis of Dynamic Schedules and Its Application to Optimization of Parallel Programs
    Angerer, Christoph M.
    Gross, Thomas R.
    [J]. LANGUAGES AND COMPILERS FOR PARALLEL COMPUTING, 2011, 6548 : 16 - 30