1 / 12

Introduction

Introduction. ECLiPSe Components. Constraint Logic Programming system, consisting of A runtime core Data-driven computation, backtracking, garbage collection A collection of libraries Constraint propagators, search support, application support, development support

lethia
Download Presentation

Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction

  2. ECLiPSe Components Constraint Logic Programming system, consisting of • A runtime core • Data-driven computation, backtracking, garbage collection • A collection of libraries • Constraint propagators, search support, application support, development support • A modelling and control language • Logic programming • A development environment • Tkeclipse • Interfaces for embedding into host environments • Java, Tcl/Tk, C/C++ • Interfaces to third-party solvers • Xpress-MP, Cplex, COIN-OR IC-Parc

  3. ECLiPSe Uses ECLiPSe is intended for • General programming tasks • especially rapid prototyping • Problem solving • using the CLP paradigm • using the available solver libraries • Development of new constraint solvers • employing ECLiPSe's lower-level language features • possibly based on the existing solvers IC-Parc

  4. Xi Cj How Does It Work - The C(L)P Paradigm Efficient Algorithms Model Heuristics Search IC-Parc

  5. Constraint (Logic) Programming Declarative Problem model Program = Logic + Control Control = Reasoning + Search Constraint propagation Clever algorithms Heuristics Problem specific knowledge IC-Parc

  6. Why use Logic Programming and Prolog? • Predicates over logical variables • Constraints over mathematical variables • (unlike ‘variable’ = storage location as in imperative languages!) • Program = Logic + Control • Solution = Model + Solver • Symbolic manipulation and metaprogramming • Program/data interchangeability is good for implementing solvers, programming search, preprocessing constraints, etc • Built-in backtracking • A general default mechanism for handling disjunctions • A convenient primitive for programming more complex search IC-Parc

  7. Constraint Program Template Algorithms deterministic efficiency :- lib(...). solve(Variables) :- setup_constraints(Variables), search(Variables). Model deterministic correctness Search nondeterministic choices & heuristics efficiency IC-Parc

  8. Logic Programming for Modelling X1{1..9} • Variables • can have attributes • e.g. domain, type • Constraints • = predicates, involving 1 or more variables • Model • = setup program _ #> _ _ #\= _ X2{3..9} alldifferent([ _, _, _ ]) [X1,X2,X3,X4]::1..9, X1 #> X2, alldifferent([X2,X3,X4]), X1 #\= X4. X4{1..7} X3{5..9} IC-Parc

  9. Logic Programming for Search • Binary choice ( X=0 ; X=1 ) • Enumerate ( X=1 ; X=2 ; X=3 ; X=4 ) X :: 1..4, indomain(X) • Split ( X #=< 5 ; X #> 5 ) • Heuristic choice ( X = Guess ; X #\= Guess ) IC-Parc

  10. Related Languages • Formal specification languages (e.g. B, Z, VDM) • More expressive power than ECLiPSe, but not executable • Mathematical modelling languages (e.g. OPL, AMPL) • Similar to ECLiPSe, but usually limited expressive power • (e.g. fixed set of constraints) and limited control • Search languages (Salsa, ToOls) • For expressing search strategies, special-purpose • Mainstream programming languages (e.g. C++ with ILOG) • Variables and constraints are “aliens” in the language • Specification mixed up with procedural control • Other CLP/high-level languages (e.g. CHIP, SICStus, Oz) • Most similar to ECLiPSe. Less support for hybrid problem solving. • Harder to define new constraints IC-Parc

  11. Components Covered in this Course • ECLiPSe Programming language • Constraint Solver Libraries • e.g. ic, eplex, ic_global, ic_sets, ic_symbolic, suspend • Search & Optimization Support Libraries • e.g. ic_search, branch_and_bound, repair • Constraint Building Support Libraries • e.g. propia, chr/ech • General Programming Support Libraries • e.g. lists, hash, … • Development Tools • e.g. tkeclipse, visualisation, coverage, profile, document IC-Parc

  12. Constraint Solver Libraries IC-Parc

More Related