(in-package 'USER) ;;; THE WINE VARIETIES ; general varieties (by grape) (cl-define-concept 'chardonnay '(and wine (fills grape chardonnay))) (cl-add-rule 'chardonnay-color @c{chardonnay} '(fills color white)) (cl-add-rule 'chardonnay-body @c{chardonnay} '(all body (one-of full medium))) (cl-add-rule 'chardonnay-flavor @c{chardonnay} '(all flavor (one-of strong moderate))) ;; Rules for 'WINE' (cl-add-rule 'wine-grape @c{WINE} '(ALL grape GRAPE)) (cl-define-primitive-role 'maker :attribute T) (cl-add-rule 'wine-maker @c{WINE} '(AND (ALL maker WINERY) (AT-LEAST 1 MAKER))) (cl-add-rule 'wine-region @c{WINE} '(AND (ALL region WINE-REGION) (AT-LEAST 1 region))) ;;More about wine varieties (cl-define-concept 'chenin-blanc '(and wine (fills grape chenin-blanc))) (cl-add-rule 'chenin-blanc-color @c{chenin-blanc} '(fills color white)) (cl-add-rule 'chenin-blanc-body @c{chenin-blanc} '(all body (one-of full medium))) (cl-add-rule 'chenin-blanc-flavor @c{chenin-blanc} '(fills flavor moderate)) (cl-add-rule 'chenin-blanc-sugar @c{chenin-blanc} '(all sugar (one-of dry off-dry))) (cl-define-concept 'semillon-or-sauvignon-blanc '(and wine (all grape (one-of semillon sauvignon-blanc)))) (cl-add-rule 'semillon-or-sauvignon-blanc-color @c{semillon-or-sauvignon-blanc} '(fills color white)) (cl-add-rule 'semillon-or-sauvignon-blanc-body @c{semillon-or-sauvignon-blanc} '(all body (one-of medium full))) (cl-define-concept 'sauvignon-blanc '(and semillon-or-sauvignon-blanc (fills grape sauvignon-blanc))) (cl-define-concept 'semillon '(and semillon-or-sauvignon-blanc (fills grape semillon))) (cl-define-concept 'riesling '(and wine (fills grape riesling))) (cl-add-rule 'riesling-color @c{riesling} '(fills color white)) (cl-define-concept 'dry-riesling '(and riesling (fills sugar dry))) (cl-add-rule 'dry-riesling-color @c{dry-riesling} '(fills color white)) (cl-add-rule 'dry-riesling-body @c{dry-riesling} '(all body (one-of light medium))) (cl-add-rule 'dry-riesling-flavor @c{dry-riesling} '(fills flavor delicate)) (cl-define-concept 'sweet-riesling '(and riesling (fills sugar sweet))) (cl-add-rule 'sweet-riesling-dessert-wine @c{sweet-riesling} 'dessert-wine) ;(cl-add-rule 'sweet-riesling-color @c{sweet-riesling} '(fills color white)) (cl-add-rule 'sweet-riesling-body @c{sweet-riesling} '(fills body full)) (cl-add-rule 'sweet-riesling-flavor @c{sweet-riesling} '(all flavor (one-of moderate strong))) (cl-define-concept 'cabernet-sauvignon-wine '(and wine (fills grape cabernet-sauvignon))) (cl-add-rule 'cabernet-sauvignon-color @c{cabernet-sauvignon-wine} '(fills color red)) (cl-add-rule 'cabernet-sauvignon-flavor @c{cabernet-sauvignon-wine} '(all flavor (one-of moderate strong))) (cl-add-rule 'cabernet-sauvignon-body @c{cabernet-sauvignon-wine} '(all body (one-of medium full))) (cl-add-rule 'cabernet-sauvignon-sugar @c{cabernet-sauvignon-wine} '(fills sugar dry)) (cl-define-concept 'pinot-noir '(and wine (fills grape pinot-noir) )) (cl-add-rule 'pinot-noir-color @c{pinot-noir} '(fills color red)) ;(cl-add-rule 'pinot-noir-body ; @c{pinot-noir} ; '(all body (one-of light medium))) ;(cl-add-rule 'pinot-noir-flavor ; @c{pinot-noir} ; '(all flavor (one-of moderate delicate))) (cl-define-concept 'pinot-blanc '(and wine (fills grape pinot-blanc) )) (cl-add-rule 'pinot-blanc-color @c{pinot-blanc} '(fills color white)) (cl-define-concept 'zinfandel '(and wine (fills grape zinfandel) )) (cl-add-rule 'zinfandel-color @c{zinfandel} '(fills color red)) (cl-add-rule 'zinfandel-body @c{zinfandel} '(all body (one-of full medium))) (cl-add-rule 'zinfandel-flavor @c{zinfandel} '(all flavor (one-of moderate strong))) (cl-add-rule 'zinfandel-sugar @c{zinfandel} '(fills sugar dry)) (cl-define-concept 'merlot-wine '(and wine (fills grape merlot) )) (cl-add-rule 'merlot-color @c{merlot-wine} '(fills color red)) (cl-add-rule 'merlot-flavor @c{merlot-wine} '(all flavor (one-of moderate delicate))) (cl-add-rule 'merlot-body @c{merlot-wine} '(all body (one-of light medium))) (cl-add-rule 'merlot-sugar @c{merlot-wine} '(fills sugar dry)) ;; regional varieties ; BORDEAUX (cl-define-concept 'bordeaux-wine '(and wine (fills region bordeaux))) (cl-define-concept 'white-bordeaux '(and bordeaux-wine white-wine)) (cl-add-rule 'white-bordeaux-grape @c{white-bordeaux} '(all grape (one-of semillon sauvignon-blanc))) (cl-define-concept 'red-bordeaux '(and bordeaux-wine red-wine)) (cl-add-rule 'red-bordeaux-grape @c{red-bordeaux} '(all grape (one-of cabernet-sauvignon merlot))) ; MEDOC: a subconcept of BORDEAUX (cl-define-concept 'medoc '(and wine (fills region medoc))) (cl-add-rule 'medoc-color @c{medoc} '(fills color red)) (cl-add-rule 'medoc-sugar @c{medoc} '(fills sugar dry)) (cl-define-primitive-concept 'pauillac 'medoc) (cl-add-rule 'pauillac-body @c{pauillac} '(fills body full)) (cl-add-rule 'pauillac-flavor @c{pauillac} '(fills flavor strong)) (cl-add-rule 'pauillac-grape @c{pauillac} '(and (fills grape cabernet-sauvignon) )) (cl-define-primitive-concept 'margaux 'medoc) (cl-add-rule 'margaux-flavor @c{margaux} '(fills flavor delicate)) (cl-add-rule 'margaux-body @c{margaux} '(fills body medium)) (cl-add-rule 'margaux-grape @c{margaux} '(and (fills grape merlot) )) ;; All wines have a harvest, but we are only using harvest for bordeaux. (cl-define-disjoint-primitive-concept 'early-harvest 'wine 'wine-harvest) (cl-add-rule 'early-harvest-sugar @c{early-harvest} '(all sugar (one-of dry off-dry))) (cl-define-disjoint-primitive-concept 'late-harvest 'wine 'wine-harvest) (cl-add-rule 'late-harvest-sugar @c{late-harvest} '(fills sugar sweet)) (cl-add-rule 'late-harvest-flavor @c{late-harvest} '(all flavor (one-of moderate strong))) ;; subconcepts of BORDEAUX (cl-define-primitive-concept 'st-emilion 'bordeaux-wine) (cl-add-rule 'st-emilion-color @c{st-emilion} '(fills color red)) (cl-add-rule 'st-emilion-flavor @c{st-emilion} '(fills flavor strong)) (cl-add-rule 'st-emilion-grape @c{st-emilion} '(and (fills grape cabernet-sauvignon) )) (cl-define-primitive-concept 'sauterne 'bordeaux-wine) (cl-add-rule 'sauterne-body @c{sauterne} '(fills body medium)) (cl-add-rule 'sauterne-color @c{sauterne} '(fills color white)) (cl-add-rule 'sauterne-harvest @c{sauterne} 'late-harvest) ; BURGUNDY (cl-define-concept 'burgundy '(and wine (fills region bourgogne))) (cl-add-rule 'burgundy-sugar @c{burgundy} '(fills sugar dry)) (cl-define-concept 'white-burgundy '(and burgundy white-wine)) (cl-add-rule 'white-burgundy-grape @c{white-burgundy} '(and (fills grape chardonnay) )) (cl-define-concept 'red-burgundy '(and burgundy red-wine)) (cl-add-rule 'red-burgundy-grape @c{red-burgundy} '(and (fills grape pinot-noir) )) (cl-define-primitive-concept 'cotes-d-or 'red-burgundy) (cl-add-rule 'cotes-d-or-flavor @c{cotes-d-or} '(fills flavor moderate)) (cl-define-primitive-concept 'meursault 'white-burgundy) (cl-add-rule 'meursault-body @c{meursault} '(fills body full)) ; BEAUJOLAIS (cl-define-primitive-concept 'beaujolais '(and wine (fills region beaujolais))) (cl-add-rule 'beaujolais-grape @c{beaujolais} '(and (fills grape gamay) )) (cl-add-rule 'beaujolais-color @c{beaujolais} '(fills color red)) (cl-add-rule 'beaujolais-body @c{beaujolais} '(fills body light)) (cl-add-rule 'beaujolais-flavor @c{beaujolais} '(fills flavor delicate)) ;LOIRE (cl-define-concept 'loire '(and wine (fills region loire))) (cl-define-concept 'white-loire '(and loire white-wine)) (cl-add-rule 'white-loire-grape @c{white-loire} '(all grape (one-of chenin-blanc pinot-blanc sauvignon-blanc))) (cl-define-primitive-concept 'muscadet 'loire) (cl-add-rule 'muscadet-grape @c{muscadet} '(and (fills grape pinot-blanc) )) (cl-add-rule 'muscadet-body @c{muscadet} '(fills body light)) (cl-add-rule 'muscadet-flavor @c{muscadet} '(fills flavor delicate)) (cl-add-rule 'muscadet-sugar @c{muscadet} '(fills sugar dry)) (cl-define-primitive-concept 'sancerre 'loire) (cl-add-rule 'sancerre-grape @c{sancerre} '(and (fills grape sauvignon-blanc) )) (cl-add-rule 'sancerre-body @c{sancerre} '(fills body medium)) (cl-add-rule 'sancerre-sugar @c{sancerre} '(fills sugar off-dry)) (cl-add-rule 'sancerre-flavor @c{sancerre} '(fills flavor delicate)) (cl-define-primitive-concept 'tours 'loire) ;; all the other characteristics are associated with chenin-blanc. (cl-add-rule 'tours-grape @c{tours} '(and (fills grape chenin-blanc) )) (cl-define-primitive-concept 'anjou 'loire) ;; Leave off the grape for anjou, because anjou is a strange case ;; where the grape is cabernet-sauvignon and the color is rose. All ;; wines thought of as cabernet-sauvignons are red. ;; Also, just deal with the rose anjous here, not the white ones. ;(cl-add-rule 'anjou-grape ; @c{anjou} '(all grape (one-of chenin-blanc cabernet-sauvignon))) (cl-add-rule 'anjou-color @c{anjou} '(fills color rose)) (cl-add-rule 'anjou-body @c{anjou} '(fills body light)) (cl-add-rule 'anjou-flavor @c{anjou} '(fills flavor delicate)) (cl-add-rule 'anjou-sugar @c{anjou} '(fills sugar off-dry)) ; ALSATIAN (cl-define-concept 'alsatian-wine '(and wine (fills region alsace))) ; AMERICAN (cl-define-concept 'american-wine '(and wine (all region AMERICAN-WINE-REGION))) ; GERMAN (cl-define-concept 'german-wine '(and wine (fills region germany))) ; ITALIAN (cl-define-concept 'italian-wine '(and wine (fills region italy))) (cl-define-primitive-concept 'chianti ' italian-wine) (cl-add-rule 'chianti-color @c{chianti} '(fills color red)) (cl-add-rule 'chianti-grape @c{chianti} '(fills grape sangiovese)) (cl-add-rule 'chianti-body @c{chianti} '(all body (one-of light medium))) (cl-add-rule 'chianti-flavor @c{chianti} '(fills flavor moderate)) (cl-add-rule 'chianti-sugar @c{chianti} '(fills sugar dry)) ; PORTUGUESE (cl-define-primitive-concept 'port '(and red-wine (fills region portugal))) (cl-add-rule 'port-body @c{port} '(fills body full)) (cl-add-rule 'port-flavor @c{port} '(fills flavor strong)) (cl-add-rule 'port-sugar @c{port} '(fills sugar sweet))