14.11.2012 Views

Curry: An Integrated Functional Logic Language

Curry: An Integrated Functional Logic Language

Curry: An Integrated Functional Logic Language

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9 Interface to External Functions and Constraint Solvers 34<br />

9.1 External Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35<br />

9.2 External Constraint Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35<br />

10 Literate Programming 36<br />

11 Interactive Programming Environment 36<br />

A Example Programs 38<br />

A.1 Operations on Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38<br />

A.2 Higher-Order Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br />

A.3 Relational Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40<br />

A.4 <strong>Functional</strong> <strong>Logic</strong> Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41<br />

A.5 Constraint Solving and Concurrent Programming . . . . . . . . . . . . . . . . . . . . 42<br />

A.6 Concurrent Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . 44<br />

B Standard Prelude 46<br />

C Syntax of <strong>Curry</strong> 59<br />

C.1 Lexicon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br />

C.2 Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />

C.3 Context Free Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />

C.4 Infix Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

D Operational Semantics of <strong>Curry</strong> 64<br />

D.1 Definitional Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64<br />

D.2 Computation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br />

D.3 Committed Choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68<br />

D.4 Equational Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68<br />

D.5 Higher-Order Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br />

D.6 Generating Definitional Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br />

D.7 Encapsulated Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72<br />

D.8 Eliminating Local Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Bibliography 78<br />

Index 82<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!