12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- % LES ENTREES
-
- hors_d_oeuvre(artichauts_melanie).
- hors_d_oeuvre(truffes_sous_le_sel).
- hors_d_oeuvre(cresson_oeuf_poche).
-
- % LES VIANDES
-
- viande(grillade_de_boeuf).
- viande(poulet_au_tilleul).
-
- % LES POISSONS
-
- poisson(bar_aux_algues).
- poisson(truite_meuniere).
-
- % LES DESSERTS
-
- dessert(sorbet_aux_poires).
- dessert(fraises_chantilly).
- dessert(melon_surprise).
-
- % LES BOISSONS (25 cl)
-
- boisson(eau_minerale(hepar)).
- boisson(vin_rouge(morgon)).
- boisson(biere(gueuze)).
-
- % VALEURS CALORIFIQUES
-
- calories(artichauts_melanie, 150).
- calories(truffes_sous_le_sel, 212).
- calories(cresson_oeuf_poche, 202).
- calories(grillade_de_boeuf, 532).
- calories(poulet_au_tilleul, 400).
- calories(bar_aux_algues, 292).
- calories(truite_meuniere,254).
- calories(sorbet_aux_poires,223).
- calories(fraises_chantilly,289).
- calories(melon_surprise, 122).
- calories(eau_minerale(hepar),0).
- calories(vin_rouge(morgon), 175).
- calories(biere(gueuze),250).
-
-
- % Option1 pour plat : avec un OU
-
- plat(P) :-
- poisson(P);
- viande(P).
-
- % Option2 pour plat -> 2 règles (faire une seule des options)
-
- % plat(P) :- poisson(P).
-
- % plat(P) :- viande(P).
-
- repas_leger([Entree,Plat,Dessert,Boisson]) :-
- hors_d_oeuvre(Entree),
- plat(Plat),
- dessert(Dessert),
- boisson(Boisson),
- calories(Entree, X),
- calories(Plat, Y),
- calories(Dessert, Z),
- calories(Boisson, T),
- (X + Y + Z + T) < 600.
-
-
-
- repas_leger_v2(R,X,L) :-
- R = [Entree,Plat,Dessert,Boisson],
- hors_d_oeuvre(Entree),
- plat(Plat),
- dessert(Dessert),
- boisson(Boisson),
- calories(Entree, U),
- calories(Plat, Y),
- calories(Dessert, Z),
- calories(Boisson, T),
- X is (U + Y + Z + T),
- X < L.
-
-
-
-
-
-
|