CS - Declaratief Programmeren

Beerend
IRW-FAN!
IRW-FAN!
Berichten: 313
Lid geworden op: 30 sep 2008, 18:15
Locatie: Mechelen
Contacteer:

CS - Declaratief Programmeren

Berichtdoor Beerend » 26 jan 2012, 13:11

1. (8 points) Explain and discuss:
a) floundering
b) abduction

2) (2 points) Consider the following meta-interpreter:

Code: Selecteer alles

prove(true)      :- !.
prove((A,B))      :- !, prove(A), prove(B).
prove(not(Goal))   :- !, not(prove(;Goal)).
prove(A)         :- clause(A,B), prove(B)

Extend the interpreter to support "universal implication", i.e. forall(P,Q) should be interpreted as for all x, P(x) => Q(x).
(Hint: the solution takes one line)

3) (5 points) Explain: anti-unification, give examples. What is the relation with unification?

4) (5 points) How can DCGs be implemented in prolog? Show the basic mechanism, e.g. using an example.

Terug naar “1ste Master in Ingenieurswetenschappen”

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers en 1 gast

cron