Strictness analysis as finite-domain constraint solving

被引:0
|
作者
Gabric, T [1 ]
Glynn, K [1 ]
Sondergaard, H [1 ]
机构
[1] Univ Melbourne, Dept Comp Sci, Parkville, Vic 3052, Australia
来源
LOGIC-BASED PROGRAM SYNTHESIS AND TRANSFORMATION | 1999年 / 1559卷
关键词
D O I
10.1007/3-540-48958-4_14
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
It has become popular to express dataflow analyses in logical form. In this paper we investigate a new approach to the analysis of functional programs, based on synthesis of constraint logic programs. We sketch how the language Toupie, originally designed with logic program analysis as one objective, lends itself also to sophisticated strictness analysis. Strictness analysis is straightforward in the simplest case, that of analysing a first-order functional language using just two strictness values, namely divergence and "don't know". Mycroft's classical translation immediately yields perfectly valid Boolean constraint logic programs, which, when run, provide the desired strictness information. However, more sophisticated analysis requires more complex domains of strictness values. We recast Wadler's classical analysis over a 2n-point domain as finite-domain constraint solving. This approach has several advantages. First, the translation is relatively simple. We translate a recursive function definition into one or two constraint program clauses, in a manner which naturally extends Mycroft's translation for the 2-point case, where the classical approach translate the definition of an n-place function over lists into 4(n) mutually recursive equations. Second, the resulting program produces relational information, allowing for example to ask which combinations of properties of input will produce a given output. Third, the approach allows us to leverage from established technology, for solving finite-domain constraints, as well as for finding fixed points. Finally, the use of (disjunctive) constraints can yield a higher precision in the analysis of some programs.
引用
收藏
页码:255 / 270
页数:16
相关论文
共 50 条
  • [1] Representing and solving finite-domain constraint problems using systems of polynomials
    Jefferson, Christopher
    Jeavons, Peter
    Green, Martin J.
    van Dongen, M. R. C.
    ANNALS OF MATHEMATICS AND ARTIFICIAL INTELLIGENCE, 2013, 67 (3-4) : 359 - 382
  • [2] Representing and solving finite-domain constraint problems using systems of polynomials
    Christopher Jefferson
    Peter Jeavons
    Martin J. Green
    M. R. C. van Dongen
    Annals of Mathematics and Artificial Intelligence, 2013, 67 : 359 - 382
  • [3] Solving hierarchies of finite-domain constraints
    Wolf, A
    JOURNAL OF EXPERIMENTAL & THEORETICAL ARTIFICIAL INTELLIGENCE, 1998, 10 (01) : 131 - 143
  • [4] Solving hierarchies of finite-domain constraints
    J Exp Theor Artif Intell, 1 (131):
  • [5] An efficient finite-domain constraint solver for circuits
    Parthasarathy, G
    Iyer, MK
    Cheng, KT
    Wang, LC
    41ST DESIGN AUTOMATION CONFERENCE, PROCEEDINGS 2004, 2004, : 212 - 217
  • [6] Representing and Solving Finite-Domain Constraint Problems using Systems of Polynomials (Extended Abstract)
    Jefferson, Chris
    Jeavons, Peter
    Green, Martin J.
    van Dongen, M. R. C.
    PRINCIPLES AND PRACTICE OF CONSTRAINT PROGRAMMING, CP 2015, 2015, 9255 : 737 - 737
  • [7] Programming finite-domain constraint propagators in action rules
    Zhou, Neng-Fa
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2006, 6 (483-507) : 483 - 507
  • [8] SOLVING FINITE-DOMAIN LINEAR CONSTRAINTS IN PRESENCE OF THE ALLDIFFERENT
    Bankovic, Milan
    LOGICAL METHODS IN COMPUTER SCIENCE, 2016, 12 (03)
  • [9] DesertFD: a finite-domain constraint based tool for design space exploration
    Brandon K. Eames
    Sandeep K. Neema
    Rohit Saraswat
    Design Automation for Embedded Systems, 2010, 14 : 43 - 74
  • [10] A Finite-Domain Constraint-Based Approach on the Stockyard Planning Problem
    Loeffler, Sven
    Becker, Ilja
    Hofstedt, Petra
    DATABASE AND EXPERT SYSTEMS APPLICATIONS, DEXA 2023, PT II, 2023, 14147 : 126 - 133