Nondeterminism analysis of functional logic programs

被引:3
作者
Brassel, B [1 ]
Hanus, M [1 ]
机构
[1] CAU Kiel, Inst Informat, D-24098 Kiel, Germany
来源
LOGIC PROGRAMMING, PROCEEDINGS | 2005年 / 3668卷
关键词
D O I
10.1007/11562931_21
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Information about the nondeterminism behavior of a functional logic program is important for various reasons. For instance, a nondeterministic choice in I/O operations results in a run-time error. Thus, it is desirable to ensure at compile time that a given program is not going to crash in this way. Furthermore, knowledge about nondeterminism can be exploited to optimize programs. In particular, if functional logic programs are compiled to target languages without builtin support for nondeterministic computations, the transformation can be much simpler if it is known that the source program is deterministic. In this paper we present a nondeterminism analysis of functional logic programs in form of a type/effect system. We present a type inferencer to approximate the nondeterminism behavior via nonstandard types and show its correctness w.r.t. the operational semantics of functional logic programs. The type inference is based on a new compact representation of sets of types and effects.
引用
收藏
页码:265 / 279
页数:15
相关论文
共 25 条
[1]   Operational semantics for declarative multi-paradigm languages [J].
Albert, E ;
Hanus, M ;
Huch, F ;
Oliver, J ;
Vidal, G .
JOURNAL OF SYMBOLIC COMPUTATION, 2005, 40 (01) :795-829
[2]  
[Anonymous], CURRY INTEGRATED FUN
[3]  
[Anonymous], 2003, Haskell 98 Language and LibrariesThe Revised Report
[4]   A needed narrowing strategy [J].
Antoy, S ;
Echahed, R ;
Hanus, M .
JOURNAL OF THE ACM, 2000, 47 (04) :776-822
[5]  
ANTOY S, 2002, LNCS, V2441, P67
[6]  
BRASSEL B, 2004, J FUNCTIONAL LOGIC P
[7]  
Cortesi A., 1991, Proceedings of Sixth Annual IEEE Symposium on Logic in Computer Science (Cat. No.91CH3025-4), P322, DOI 10.1109/LICS.1991.151656
[8]  
DEBRAY SK, 1986, LECT NOTES COMPUT SC, V225, P490
[9]  
Demoen P, 1999, LOGIC PROGRAMM, P260
[10]  
Hanus M., 2000, Proceedings of the 2nd International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP '00), P202, DOI 10.1145/351268.351292