% % This file contains some facts about countries of the EEC, expressed in Prolog. % (N.B. there are many other ways of expressing these facts in Prolog - follow % the lectures!). % % The file is accessible to you as ECMI01.AI2_EEC and you can "read it in" % when you are talking to the Prolog interpreter, by the Prolog command % ['ecmi01.ai2_eec']. % - the square brackets, single quotes and the final full stop all being % necessary. % Written by Peter Ross, 11 October 1982 area(belgium,11781). currency(belgium,franc). population(belgium,9855). exports(belgium,['manufactured goods',coal,steel,textiles]). capital(belgium,brussels). roads(belgium,11277). natday(belgium,july,21). area(denmark,17000). currency(denmark,krone). population(denmark,5111). exports(denmark,['agricultural products','dairy products',machinery]). capital(denmark,copenhagen). natday(denmark,june,5). area(france,213000). currency(france,franc). population(france,53371). exports(france,[cars,steel,textiles,'chemical products',wine]). capital(france,paris). natday(france,july,14). area(germany,96011). currency(germany,mark). population(germany,61439). exports(germany,['manufactured goods',cars,steel,textiles, machinery,'agricultural products']). capital(germany,bonn). % N.B. no German national day area(italy,131000). currency(italy,lira). population(italy,56024). exports(italy,[cars,steel,textiles,footwear,'chemical products']). capital(italy,rome). natday(italy,june,2). area(luxemburg,999). currency(luxemburg,franc). population(luxemburg,355). exports(luxemburg,[steel]). capital(luxemburg,luxemburg). natday(june,23). area(netherlands,13500). currency(netherlands,florin). population(netherlands,13898). exports(netherlands,['agricultural products',machinery,'electrical goods', electronics,textiles]). capital(netherlands,hague). natday(netherlands,april,30). area(uk,93051). currency(uk,pound). population(uk,55836). exports(uk,[machinery,cars,steel,textiles,'agricultural products', 'chemical products']). capital(uk,london). % N.B. no UK national day % All the above are "facts" to Prolog (though they may not, of course, agree % with the real world). The two lines below define a "rule" - the details % will be explained in the lectures. On first sight they will probably % be incomprehensible, so ignore them till the lectures get there... member(Item,[Item|RestOfList]). member(Item,[_|RestOfList]) :- member(Item,RestOfList).