|
|
|
:- dynamic term_expansion/2. |
|
:- multifile term_expansion/2. |
|
|
|
|
|
great_grandson(X, Y) :- |
|
great_grandchild(X, Y), |
|
male(Y). |
|
|
|
second_aunt(X, Y) :- |
|
great_grandparent(X, A), |
|
sister(A, Y). |
|
|
|
great_grandchild(X, Y) :- |
|
great_grandparent(Y, X). |
|
|
|
:- dynamic attribute/1. |
|
|
|
attribute(contractor). |
|
attribute(meditation). |
|
attribute('teacher, adult education'). |
|
attribute(meteorology). |
|
attribute('biomedical scientist'). |
|
attribute(biology). |
|
attribute('freight forwarder'). |
|
attribute(meteorology). |
|
attribute('commercial/residential surveyor'). |
|
attribute(dolls). |
|
attribute('research scientist (life sciences)'). |
|
attribute(photography). |
|
attribute('production assistant, television'). |
|
attribute(shogi). |
|
attribute('public house manager'). |
|
attribute(dominoes). |
|
attribute('museum education officer'). |
|
attribute('tether car'). |
|
attribute('engineer, manufacturing systems'). |
|
attribute(architecture). |
|
attribute('chief marketing officer'). |
|
attribute(geocaching). |
|
attribute('ranger/warden'). |
|
attribute(trainspotting). |
|
attribute('air cabin crew'). |
|
attribute('bus spotting'). |
|
attribute('newspaper journalist'). |
|
attribute(research). |
|
attribute('police officer'). |
|
attribute(geography). |
|
attribute(translator). |
|
attribute(microbiology). |
|
attribute('accountant, chartered'). |
|
attribute(canoeing). |
|
attribute('product designer'). |
|
attribute(learning). |
|
attribute('geographical information systems officer'). |
|
attribute('dairy farming'). |
|
attribute('estate manager/land agent'). |
|
attribute('fossil hunting'). |
|
attribute('therapist, art'). |
|
attribute(sociology). |
|
attribute('civil engineer, consulting'). |
|
attribute(finance). |
|
attribute('investment banker, corporate'). |
|
attribute(meditation). |
|
attribute('airline pilot'). |
|
attribute('wikipedia editing'). |
|
attribute('advertising copywriter'). |
|
attribute('radio-controlled car racing'). |
|
attribute('agricultural engineer'). |
|
attribute('social studies'). |
|
attribute('special educational needs teacher'). |
|
attribute(judo). |
|
attribute(acupuncturist). |
|
attribute('flying disc'). |
|
attribute('museum/gallery curator'). |
|
attribute(cricket). |
|
attribute('engineer, technical sales'). |
|
attribute(weightlifting). |
|
attribute('pharmacist, hospital'). |
|
attribute(meditation). |
|
attribute('air cabin crew'). |
|
attribute('ballroom dancing'). |
|
attribute('secretary, company'). |
|
attribute(microscopy). |
|
attribute('environmental education officer'). |
|
attribute(reading). |
|
attribute('primary school teacher'). |
|
attribute('laser tag'). |
|
attribute('research scientist (life sciences)'). |
|
attribute('hiking/backpacking'). |
|
attribute(surgeon). |
|
attribute(audiophile). |
|
attribute('exhibitions officer, museum/gallery'). |
|
attribute('tennis polo'). |
|
attribute('location manager'). |
|
attribute(photography). |
|
attribute('exercise physiologist'). |
|
attribute(backgammon). |
|
attribute('english as a foreign language teacher'). |
|
attribute(microscopy). |
|
attribute('psychiatric nurse'). |
|
attribute(herping). |
|
attribute('horticultural consultant'). |
|
attribute(philately). |
|
attribute('advertising copywriter'). |
|
attribute(birdwatching). |
|
attribute('pension scheme manager'). |
|
attribute(shogi). |
|
attribute('surveyor, commercial/residential'). |
|
attribute('magnet fishing'). |
|
attribute(chiropodist). |
|
attribute('table tennis'). |
|
attribute('electronics engineer'). |
|
attribute('scuba diving'). |
|
attribute('housing manager/officer'). |
|
attribute(biology). |
|
attribute('community arts worker'). |
|
attribute('sea glass collecting'). |
|
|
|
great_granddaughter(X, Y) :- |
|
great_grandchild(X, Y), |
|
female(Y). |
|
|
|
:- dynamic library_directory/1. |
|
:- multifile library_directory/1. |
|
|
|
|
|
great_grandmother(X, Y) :- |
|
great_grandparent(X, Y), |
|
female(Y). |
|
|
|
great_grandfather(X, Y) :- |
|
great_grandparent(X, Y), |
|
male(Y). |
|
|
|
:- dynamic term_expansion/4. |
|
:- multifile term_expansion/4. |
|
|
|
|
|
grandson(X, Y) :- |
|
grandchild(X, Y), |
|
male(Y). |
|
|
|
:- dynamic goal_expansion/4. |
|
:- multifile goal_expansion/4. |
|
|
|
|
|
great_grandparent(X, Y) :- |
|
grandparent(X, Z), |
|
parent(Z, Y). |
|
|
|
grandchild(X, Y) :- |
|
grandparent(Y, X). |
|
|
|
:- dynamic file_search_path/2. |
|
:- multifile file_search_path/2. |
|
|
|
file_search_path(library, Dir) :- |
|
library_directory(Dir). |
|
file_search_path(swi, A) :- |
|
system:current_prolog_flag(home, A). |
|
file_search_path(swi, A) :- |
|
system:current_prolog_flag(shared_home, A). |
|
file_search_path(library, app_config(lib)). |
|
file_search_path(library, swi(library)). |
|
file_search_path(library, swi(library/clp)). |
|
file_search_path(library, A) :- |
|
system:'$ext_library_directory'(A). |
|
file_search_path(foreign, swi(A)) :- |
|
system: |
|
( current_prolog_flag(apple_universal_binary, true), |
|
A='lib/fat-darwin' |
|
). |
|
file_search_path(path, A) :- |
|
system: |
|
( getenv('PATH', B), |
|
current_prolog_flag(path_sep, C), |
|
atomic_list_concat(D, C, B), |
|
'$member'(A, D) |
|
). |
|
file_search_path(user_app_data, A) :- |
|
system:'$xdg_prolog_directory'(data, A). |
|
file_search_path(common_app_data, A) :- |
|
system:'$xdg_prolog_directory'(common_data, A). |
|
file_search_path(user_app_config, A) :- |
|
system:'$xdg_prolog_directory'(config, A). |
|
file_search_path(common_app_config, A) :- |
|
system:'$xdg_prolog_directory'(common_config, A). |
|
file_search_path(app_data, user_app_data('.')). |
|
file_search_path(app_data, common_app_data('.')). |
|
file_search_path(app_config, user_app_config('.')). |
|
file_search_path(app_config, common_app_config('.')). |
|
file_search_path(app_preferences, user_app_config('.')). |
|
file_search_path(user_profile, app_preferences('.')). |
|
file_search_path(app, swi(app)). |
|
file_search_path(app, app_data(app)). |
|
file_search_path(autoload, swi(library)). |
|
file_search_path(autoload, pce(prolog/lib)). |
|
file_search_path(autoload, app_config(lib)). |
|
file_search_path(autoload, Dir) :- |
|
'$autoload':'$ext_library_directory'(Dir). |
|
file_search_path(pack, app_data(pack)). |
|
file_search_path(library, PackLib) :- |
|
'$pack':pack_dir(_Name, prolog, PackLib). |
|
file_search_path(foreign, PackLib) :- |
|
'$pack':pack_dir(_Name, foreign, PackLib). |
|
file_search_path(app, AppDir) :- |
|
'$pack':pack_dir(_Name, app, AppDir). |
|
|
|
granddaughter(X, Y) :- |
|
grandchild(X, Y), |
|
female(Y). |
|
|
|
great_aunt(X, Y) :- |
|
grandparent(X, A), |
|
sister(A, Y). |
|
|
|
:- multifile prolog_predicate_name/2. |
|
|
|
|
|
:- multifile prolog_list_goal/1. |
|
|
|
|
|
great_uncle(X, Y) :- |
|
grandparent(X, A), |
|
brother(A, Y). |
|
|
|
grandmother(X, Y) :- |
|
grandparent(X, Y), |
|
female(Y). |
|
|
|
grandfather(X, Y) :- |
|
grandparent(X, Y), |
|
male(Y). |
|
|
|
:- dynamic hobby/2. |
|
|
|
hobby(alejandra, meditation). |
|
hobby(antionette, meteorology). |
|
hobby(brigida, biology). |
|
hobby(concepcion, meteorology). |
|
hobby(daisy, dolls). |
|
hobby(deanna, photography). |
|
hobby(dixie, shogi). |
|
hobby(ila, dominoes). |
|
hobby(johnna, 'tether car'). |
|
hobby(kanesha, architecture). |
|
hobby(kari, geocaching). |
|
hobby(lyndia, trainspotting). |
|
hobby(lynn, 'bus spotting'). |
|
hobby(maggie, research). |
|
hobby(marya, geography). |
|
hobby(meghann, microbiology). |
|
hobby(miki, canoeing). |
|
hobby(nell, learning). |
|
hobby(reyna, 'dairy farming'). |
|
hobby(rosalee, 'fossil hunting'). |
|
hobby(sandy, sociology). |
|
hobby(thomasine, finance). |
|
hobby(tona, meditation). |
|
hobby(velia, 'wikipedia editing'). |
|
hobby(vilma, 'radio-controlled car racing'). |
|
hobby(alberto, 'social studies'). |
|
hobby(alfonso, judo). |
|
hobby(alton, 'flying disc'). |
|
hobby(billie, cricket). |
|
hobby(colby, weightlifting). |
|
hobby(cordell, meditation). |
|
hobby(cornelius, 'ballroom dancing'). |
|
hobby(dante, microscopy). |
|
hobby(deangelo, reading). |
|
hobby(derick, 'laser tag'). |
|
hobby(dominick, 'hiking/backpacking'). |
|
hobby(ellis, audiophile). |
|
hobby(fidel, 'tennis polo'). |
|
hobby(jeff, photography). |
|
hobby(joe, backgammon). |
|
hobby(kurt, microscopy). |
|
hobby(leonardo, herping). |
|
hobby(manual, philately). |
|
hobby(matt, birdwatching). |
|
hobby(milo, shogi). |
|
hobby(nick, 'magnet fishing'). |
|
hobby(reinaldo, 'table tennis'). |
|
hobby(scotty, 'scuba diving'). |
|
hobby(tanner, biology). |
|
hobby(vicente, 'sea glass collecting'). |
|
|
|
:- dynamic expand_query/4. |
|
:- multifile expand_query/4. |
|
|
|
|
|
nephew(X, Y) :- |
|
sibling(X, A), |
|
son(A, Y). |
|
|
|
:- multifile message_property/2. |
|
|
|
|
|
grandparent(X, Y) :- |
|
parent(X, Z), |
|
parent(Z, Y). |
|
|
|
:- dynamic job/2. |
|
|
|
job(alejandra, contractor). |
|
job(antionette, 'teacher, adult education'). |
|
job(brigida, 'biomedical scientist'). |
|
job(concepcion, 'freight forwarder'). |
|
job(daisy, 'commercial/residential surveyor'). |
|
job(deanna, 'research scientist (life sciences)'). |
|
job(dixie, 'production assistant, television'). |
|
job(ila, 'public house manager'). |
|
job(johnna, 'museum education officer'). |
|
job(kanesha, 'engineer, manufacturing systems'). |
|
job(kari, 'chief marketing officer'). |
|
job(lyndia, 'ranger/warden'). |
|
job(lynn, 'air cabin crew'). |
|
job(maggie, 'newspaper journalist'). |
|
job(marya, 'police officer'). |
|
job(meghann, translator). |
|
job(miki, 'accountant, chartered'). |
|
job(nell, 'product designer'). |
|
job(reyna, 'geographical information systems officer'). |
|
job(rosalee, 'estate manager/land agent'). |
|
job(sandy, 'therapist, art'). |
|
job(thomasine, 'civil engineer, consulting'). |
|
job(tona, 'investment banker, corporate'). |
|
job(velia, 'airline pilot'). |
|
job(vilma, 'advertising copywriter'). |
|
job(alberto, 'agricultural engineer'). |
|
job(alfonso, 'special educational needs teacher'). |
|
job(alton, acupuncturist). |
|
job(billie, 'museum/gallery curator'). |
|
job(colby, 'engineer, technical sales'). |
|
job(cordell, 'pharmacist, hospital'). |
|
job(cornelius, 'air cabin crew'). |
|
job(dante, 'secretary, company'). |
|
job(deangelo, 'environmental education officer'). |
|
job(derick, 'primary school teacher'). |
|
job(dominick, 'research scientist (life sciences)'). |
|
job(ellis, surgeon). |
|
job(fidel, 'exhibitions officer, museum/gallery'). |
|
job(jeff, 'location manager'). |
|
job(joe, 'exercise physiologist'). |
|
job(kurt, 'english as a foreign language teacher'). |
|
job(leonardo, 'psychiatric nurse'). |
|
job(manual, 'horticultural consultant'). |
|
job(matt, 'advertising copywriter'). |
|
job(milo, 'pension scheme manager'). |
|
job(nick, 'surveyor, commercial/residential'). |
|
job(reinaldo, chiropodist). |
|
job(scotty, 'electronics engineer'). |
|
job(tanner, 'housing manager/officer'). |
|
job(vicente, 'community arts worker'). |
|
|
|
:- dynamic dob/2. |
|
|
|
dob(alberto, '0237-02-03'). |
|
dob(alejandra, '0235-07-20'). |
|
dob(alfonso, '0240-12-31'). |
|
dob(alton, '0263-06-10'). |
|
dob(antionette, '0239-10-28'). |
|
dob(billie, '0295-07-12'). |
|
dob(brigida, '0269-08-16'). |
|
dob(colby, '0244-04-07'). |
|
dob(concepcion, '0261-10-15'). |
|
dob(cordell, '0259-02-05'). |
|
dob(cornelius, '0236-05-17'). |
|
dob(daisy, '0237-11-04'). |
|
dob(dante, '0302-03-27'). |
|
dob(deangelo, '0239-07-26'). |
|
dob(deanna, '0270-07-11'). |
|
dob(derick, '0212-09-01'). |
|
dob(dixie, '0270-01-28'). |
|
dob(dominick, '0236-06-02'). |
|
dob(ellis, '0272-04-21'). |
|
dob(fidel, '0269-04-02'). |
|
dob(ila, '0241-07-17'). |
|
dob(jeff, '0235-02-07'). |
|
dob(joe, '0257-10-11'). |
|
dob(johnna, '0264-08-02'). |
|
dob(kanesha, '0212-07-22'). |
|
dob(kari, '0238-10-28'). |
|
dob(kurt, '0274-03-29'). |
|
dob(leonardo, '0243-12-17'). |
|
dob(lyndia, '0178-04-18'). |
|
dob(lynn, '0280-05-23'). |
|
dob(maggie, '0148-03-17'). |
|
dob(manual, '0213-10-09'). |
|
dob(marya, '0235-10-22'). |
|
dob(matt, '0205-10-16'). |
|
dob(meghann, '0230-04-06'). |
|
dob(miki, '0256-10-26'). |
|
dob(milo, '0261-06-07'). |
|
dob(nell, '0245-08-08'). |
|
dob(nick, '0266-03-19'). |
|
dob(reinaldo, '0263-06-05'). |
|
dob(reyna, '0261-08-01'). |
|
dob(rosalee, '0260-09-04'). |
|
dob(sandy, '0237-01-15'). |
|
dob(scotty, '0149-12-17'). |
|
dob(tanner, '0231-07-16'). |
|
dob(thomasine, '0204-09-13'). |
|
dob(tona, '0202-02-11'). |
|
dob(velia, '0289-04-22'). |
|
dob(vicente, '0178-01-25'). |
|
dob(vilma, '0214-03-01'). |
|
|
|
husband(X, Y) :- |
|
married(X, Y), |
|
male(Y). |
|
|
|
:- dynamic expand_answer/2. |
|
:- multifile expand_answer/2. |
|
|
|
|
|
niece(X, Y) :- |
|
sibling(X, A), |
|
daughter(A, Y). |
|
|
|
daughter(X, Y) :- |
|
child(X, Y), |
|
female(Y). |
|
|
|
wife(X, Y) :- |
|
married(X, Y), |
|
female(Y). |
|
|
|
:- dynamic exception/3. |
|
:- multifile exception/3. |
|
|
|
|
|
:- dynamic friend_/2. |
|
|
|
friend_(alejandra, antionette). |
|
friend_(alejandra, concepcion). |
|
friend_(alejandra, ila). |
|
friend_(alejandra, rosalee). |
|
friend_(alejandra, alfonso). |
|
friend_(alejandra, colby). |
|
friend_(alejandra, leonardo). |
|
friend_(antionette, concepcion). |
|
friend_(antionette, ila). |
|
friend_(antionette, marya). |
|
friend_(antionette, rosalee). |
|
friend_(antionette, alfonso). |
|
friend_(antionette, colby). |
|
friend_(antionette, cordell). |
|
friend_(antionette, leonardo). |
|
friend_(antionette, matt). |
|
friend_(antionette, tanner). |
|
friend_(brigida, daisy). |
|
friend_(brigida, kanesha). |
|
friend_(brigida, nell). |
|
friend_(brigida, velia). |
|
friend_(brigida, vilma). |
|
friend_(brigida, manual). |
|
friend_(concepcion, ila). |
|
friend_(concepcion, marya). |
|
friend_(concepcion, rosalee). |
|
friend_(concepcion, alfonso). |
|
friend_(concepcion, colby). |
|
friend_(concepcion, cordell). |
|
friend_(concepcion, leonardo). |
|
friend_(concepcion, tanner). |
|
friend_(daisy, kanesha). |
|
friend_(daisy, nell). |
|
friend_(daisy, velia). |
|
friend_(daisy, vilma). |
|
friend_(daisy, dominick). |
|
friend_(daisy, manual). |
|
friend_(deanna, kanesha). |
|
friend_(deanna, lyndia). |
|
friend_(deanna, miki). |
|
friend_(deanna, reyna). |
|
friend_(deanna, sandy). |
|
friend_(deanna, thomasine). |
|
friend_(deanna, cornelius). |
|
friend_(deanna, derick). |
|
friend_(deanna, ellis). |
|
friend_(deanna, jeff). |
|
friend_(deanna, tanner). |
|
friend_(dixie, johnna). |
|
friend_(dixie, kari). |
|
friend_(dixie, maggie). |
|
friend_(dixie, meghann). |
|
friend_(dixie, billie). |
|
friend_(dixie, fidel). |
|
friend_(dixie, kurt). |
|
friend_(dixie, nick). |
|
friend_(dixie, reinaldo). |
|
friend_(ila, marya). |
|
friend_(ila, rosalee). |
|
friend_(ila, alfonso). |
|
friend_(ila, colby). |
|
friend_(ila, cordell). |
|
friend_(ila, leonardo). |
|
friend_(ila, tanner). |
|
friend_(johnna, kari). |
|
friend_(johnna, maggie). |
|
friend_(johnna, meghann). |
|
friend_(johnna, billie). |
|
friend_(johnna, fidel). |
|
friend_(johnna, kurt). |
|
friend_(johnna, nick). |
|
friend_(johnna, reinaldo). |
|
friend_(kanesha, lyndia). |
|
friend_(kanesha, miki). |
|
friend_(kanesha, nell). |
|
friend_(kanesha, reyna). |
|
friend_(kanesha, sandy). |
|
friend_(kanesha, thomasine). |
|
friend_(kanesha, velia). |
|
friend_(kanesha, vilma). |
|
friend_(kanesha, cornelius). |
|
friend_(kanesha, derick). |
|
friend_(kanesha, ellis). |
|
friend_(kanesha, jeff). |
|
friend_(kanesha, manual). |
|
friend_(kari, maggie). |
|
friend_(kari, meghann). |
|
friend_(kari, billie). |
|
friend_(kari, fidel). |
|
friend_(kari, kurt). |
|
friend_(kari, nick). |
|
friend_(kari, reinaldo). |
|
friend_(lyndia, miki). |
|
friend_(lyndia, reyna). |
|
friend_(lyndia, sandy). |
|
friend_(lyndia, thomasine). |
|
friend_(lyndia, cornelius). |
|
friend_(lyndia, derick). |
|
friend_(lyndia, ellis). |
|
friend_(lyndia, jeff). |
|
friend_(lyndia, tanner). |
|
friend_(lynn, tona). |
|
friend_(lynn, alton). |
|
friend_(lynn, deangelo). |
|
friend_(lynn, milo). |
|
friend_(lynn, scotty). |
|
friend_(maggie, meghann). |
|
friend_(maggie, tona). |
|
friend_(maggie, alberto). |
|
friend_(maggie, billie). |
|
friend_(maggie, fidel). |
|
friend_(maggie, joe). |
|
friend_(maggie, kurt). |
|
friend_(maggie, nick). |
|
friend_(maggie, reinaldo). |
|
friend_(marya, rosalee). |
|
friend_(marya, alfonso). |
|
friend_(marya, cordell). |
|
friend_(marya, leonardo). |
|
friend_(marya, tanner). |
|
friend_(meghann, alberto). |
|
friend_(meghann, billie). |
|
friend_(meghann, fidel). |
|
friend_(meghann, kurt). |
|
friend_(meghann, nick). |
|
friend_(meghann, reinaldo). |
|
friend_(miki, reyna). |
|
friend_(miki, sandy). |
|
friend_(miki, thomasine). |
|
friend_(miki, cornelius). |
|
friend_(miki, derick). |
|
friend_(miki, ellis). |
|
friend_(miki, jeff). |
|
friend_(miki, tanner). |
|
friend_(nell, velia). |
|
friend_(nell, vilma). |
|
friend_(nell, dominick). |
|
friend_(nell, manual). |
|
friend_(reyna, sandy). |
|
friend_(reyna, thomasine). |
|
friend_(reyna, cornelius). |
|
friend_(reyna, derick). |
|
friend_(reyna, ellis). |
|
friend_(reyna, jeff). |
|
friend_(reyna, tanner). |
|
friend_(rosalee, alfonso). |
|
friend_(rosalee, colby). |
|
friend_(rosalee, cordell). |
|
friend_(rosalee, deangelo). |
|
friend_(rosalee, leonardo). |
|
friend_(rosalee, tanner). |
|
friend_(sandy, thomasine). |
|
friend_(sandy, cornelius). |
|
friend_(sandy, derick). |
|
friend_(sandy, ellis). |
|
friend_(sandy, jeff). |
|
friend_(sandy, tanner). |
|
friend_(thomasine, cornelius). |
|
friend_(thomasine, derick). |
|
friend_(thomasine, ellis). |
|
friend_(thomasine, jeff). |
|
friend_(thomasine, tanner). |
|
friend_(tona, alton). |
|
friend_(tona, deangelo). |
|
friend_(tona, milo). |
|
friend_(tona, scotty). |
|
friend_(velia, vilma). |
|
friend_(velia, dominick). |
|
friend_(velia, manual). |
|
friend_(vilma, dominick). |
|
friend_(vilma, manual). |
|
friend_(alberto, kurt). |
|
friend_(alberto, nick). |
|
friend_(alfonso, colby). |
|
friend_(alfonso, cordell). |
|
friend_(alfonso, leonardo). |
|
friend_(alfonso, tanner). |
|
friend_(alton, deangelo). |
|
friend_(alton, leonardo). |
|
friend_(alton, milo). |
|
friend_(alton, scotty). |
|
friend_(billie, fidel). |
|
friend_(billie, kurt). |
|
friend_(billie, nick). |
|
friend_(colby, leonardo). |
|
friend_(cordell, leonardo). |
|
friend_(cordell, tanner). |
|
friend_(cornelius, derick). |
|
friend_(cornelius, ellis). |
|
friend_(cornelius, jeff). |
|
friend_(cornelius, tanner). |
|
friend_(deangelo, leonardo). |
|
friend_(deangelo, milo). |
|
friend_(deangelo, scotty). |
|
friend_(derick, ellis). |
|
friend_(derick, jeff). |
|
friend_(derick, tanner). |
|
friend_(dominick, manual). |
|
friend_(ellis, jeff). |
|
friend_(fidel, kurt). |
|
friend_(fidel, nick). |
|
friend_(fidel, reinaldo). |
|
friend_(jeff, tanner). |
|
friend_(joe, kurt). |
|
friend_(joe, nick). |
|
friend_(kurt, nick). |
|
friend_(kurt, reinaldo). |
|
friend_(leonardo, scotty). |
|
friend_(leonardo, tanner). |
|
friend_(milo, scotty). |
|
friend_(nick, reinaldo). |
|
|
|
child(X, Y) :- |
|
parent(Y, X). |
|
|
|
:- thread_local thread_message_hook/3. |
|
:- dynamic thread_message_hook/3. |
|
:- volatile thread_message_hook/3. |
|
|
|
|
|
son(X, Y) :- |
|
child(X, Y), |
|
male(Y). |
|
|
|
friend(X, Y) :- |
|
friend_(X, Y). |
|
friend(X, Y) :- |
|
friend_(Y, X). |
|
|
|
:- dynamic male/1. |
|
|
|
male(alberto). |
|
male(alfonso). |
|
male(alton). |
|
male(billie). |
|
male(colby). |
|
male(cordell). |
|
male(cornelius). |
|
male(dante). |
|
male(deangelo). |
|
male(derick). |
|
male(dominick). |
|
male(ellis). |
|
male(fidel). |
|
male(jeff). |
|
male(joe). |
|
male(kurt). |
|
male(leonardo). |
|
male(manual). |
|
male(matt). |
|
male(milo). |
|
male(nick). |
|
male(reinaldo). |
|
male(scotty). |
|
male(tanner). |
|
male(vicente). |
|
|
|
:- dynamic prolog_file_type/2. |
|
:- multifile prolog_file_type/2. |
|
|
|
prolog_file_type(pl, prolog). |
|
prolog_file_type(prolog, prolog). |
|
prolog_file_type(qlf, prolog). |
|
prolog_file_type(qlf, qlf). |
|
prolog_file_type(A, executable) :- |
|
system:current_prolog_flag(shared_object_extension, A). |
|
prolog_file_type(dylib, executable) :- |
|
system:current_prolog_flag(apple, true). |
|
|
|
male_first_cousin_once_removed(X, Y) :- |
|
cousin(X, A), |
|
son(A, Y), |
|
X\=Y. |
|
|
|
mother(X, Y) :- |
|
parent(X, Y), |
|
female(Y). |
|
|
|
:- dynamic message_hook/3. |
|
:- multifile message_hook/3. |
|
|
|
|
|
father(X, Y) :- |
|
parent(X, Y), |
|
male(Y). |
|
|
|
female_first_cousin_once_removed(X, Y) :- |
|
cousin(X, A), |
|
daughter(A, Y), |
|
X\=Y. |
|
|
|
:- dynamic female/1. |
|
|
|
female(alejandra). |
|
female(antionette). |
|
female(brigida). |
|
female(concepcion). |
|
female(daisy). |
|
female(deanna). |
|
female(dixie). |
|
female(ila). |
|
female(johnna). |
|
female(kanesha). |
|
female(kari). |
|
female(lyndia). |
|
female(lynn). |
|
female(maggie). |
|
female(marya). |
|
female(meghann). |
|
female(miki). |
|
female(nell). |
|
female(reyna). |
|
female(rosalee). |
|
female(sandy). |
|
female(thomasine). |
|
female(tona). |
|
female(velia). |
|
female(vilma). |
|
|
|
male_second_cousin(X, Y) :- |
|
parent(X, A), |
|
parent(Y, B), |
|
cousin(A, B), |
|
male(Y), |
|
X\=Y. |
|
|
|
brother(X, Y) :- |
|
sibling(X, Y), |
|
male(Y). |
|
|
|
:- dynamic resource/2. |
|
:- multifile resource/2. |
|
|
|
|
|
:- dynamic portray/1. |
|
:- multifile portray/1. |
|
|
|
|
|
:- dynamic goal_expansion/2. |
|
:- multifile goal_expansion/2. |
|
|
|
|
|
female_second_cousin(X, Y) :- |
|
parent(X, A), |
|
parent(Y, B), |
|
cousin(A, B), |
|
female(Y), |
|
X\=Y. |
|
|
|
:- dynamic prolog_load_file/2. |
|
:- multifile prolog_load_file/2. |
|
|
|
|
|
male_cousin(X, Y) :- |
|
cousin(X, Y), |
|
male(Y). |
|
|
|
sister(Y, X) :- |
|
sibling(X, Y), |
|
female(X). |
|
|
|
:- multifile prolog_clause_name/2. |
|
|
|
|
|
female_cousin(X, Y) :- |
|
cousin(X, Y), |
|
female(Y). |
|
|
|
:- dynamic resource/3. |
|
:- multifile resource/3. |
|
|
|
|
|
cousin(X, Y) :- |
|
parent(X, A), |
|
parent(Y, B), |
|
sibling(A, B), |
|
X\=Y. |
|
|
|
:- dynamic parent/2. |
|
|
|
parent(alejandra, matt). |
|
parent(alejandra, thomasine). |
|
parent(alfonso, derick). |
|
parent(alfonso, kanesha). |
|
parent(alton, antionette). |
|
parent(alton, deangelo). |
|
parent(antionette, derick). |
|
parent(antionette, kanesha). |
|
parent(billie, dixie). |
|
parent(billie, fidel). |
|
parent(brigida, leonardo). |
|
parent(brigida, nell). |
|
parent(colby, derick). |
|
parent(colby, kanesha). |
|
parent(concepcion, jeff). |
|
parent(concepcion, marya). |
|
parent(cordell, meghann). |
|
parent(cordell, tanner). |
|
parent(daisy, matt). |
|
parent(daisy, thomasine). |
|
parent(dante, brigida). |
|
parent(dante, ellis). |
|
parent(deanna, daisy). |
|
parent(deanna, dominick). |
|
parent(dixie, antionette). |
|
parent(dixie, deangelo). |
|
parent(dominick, derick). |
|
parent(dominick, kanesha). |
|
parent(ellis, alfonso). |
|
parent(ellis, ila). |
|
parent(ila, manual). |
|
parent(ila, vilma). |
|
parent(joe, alberto). |
|
parent(joe, sandy). |
|
parent(johnna, antionette). |
|
parent(johnna, deangelo). |
|
parent(kari, derick). |
|
parent(kari, kanesha). |
|
parent(kurt, antionette). |
|
parent(kurt, deangelo). |
|
parent(lyndia, maggie). |
|
parent(lyndia, scotty). |
|
parent(lynn, joe). |
|
parent(lynn, miki). |
|
parent(matt, lyndia). |
|
parent(matt, vicente). |
|
parent(meghann, matt). |
|
parent(meghann, thomasine). |
|
parent(miki, meghann). |
|
parent(miki, tanner). |
|
parent(milo, meghann). |
|
parent(milo, tanner). |
|
parent(nick, antionette). |
|
parent(nick, deangelo). |
|
parent(reinaldo, cornelius). |
|
parent(reinaldo, kari). |
|
parent(reyna, daisy). |
|
parent(reyna, dominick). |
|
parent(rosalee, daisy). |
|
parent(rosalee, dominick). |
|
parent(tona, lyndia). |
|
parent(tona, vicente). |
|
parent(velia, alton). |
|
parent(velia, concepcion). |
|
|
|
:- dynamic nonbinary/1. |
|
|
|
|
|
married(X, Y) :- |
|
parent(Child, X), |
|
parent(Child, Y), |
|
X\=Y. |
|
|
|
uncle(X, Y) :- |
|
parent(X, A), |
|
brother(A, Y). |
|
|
|
aunt(X, Y) :- |
|
parent(X, A), |
|
sister(A, Y). |
|
|
|
:- dynamic pyrun/2. |
|
|
|
pyrun(A, B) :- |
|
read_term_from_atom(A, C, [variable_names(B)]), |
|
call(C). |
|
|
|
:- dynamic save_all_clauses_to_file/1. |
|
|
|
save_all_clauses_to_file(A) :- |
|
open(A, write, B), |
|
set_output(B), |
|
listing, |
|
close(B). |
|
|
|
sibling(X, Y) :- |
|
parent(X, A), |
|
parent(Y, A), |
|
X\=Y. |
|
|
|
second_uncle(X, Y) :- |
|
great_grandparent(X, A), |
|
brother(A, Y). |
|
|