|
|
|
:- dynamic term_expansion/2. |
|
:- multifile term_expansion/2. |
|
|
|
|
|
great_grandfather(X, Y) :- |
|
great_grandparent(X, Y), |
|
male(Y). |
|
|
|
great_grandchild(X, Y) :- |
|
great_grandparent(Y, X). |
|
|
|
great_grandparent(X, Y) :- |
|
grandparent(X, Z), |
|
parent(Z, Y). |
|
|
|
:- dynamic library_directory/1. |
|
:- multifile library_directory/1. |
|
|
|
|
|
great_grandmother(X, Y) :- |
|
great_grandparent(X, Y), |
|
female(Y). |
|
|
|
:- dynamic goal_expansion/4. |
|
:- multifile goal_expansion/4. |
|
|
|
|
|
:- dynamic hobby/2. |
|
|
|
hobby("Abdul Felker", "birdwatching"). |
|
hobby("Adolph Barbee", "geography"). |
|
hobby("Alice Lance", "research"). |
|
hobby("Allie Barbee", "audiophile"). |
|
hobby("Allison Barbee", "knowledge/word games"). |
|
hobby("Alvin Lance", "geocaching"). |
|
hobby("Andres Barbee", "croquet"). |
|
hobby("Andrew Parkinson", "badminton"). |
|
hobby("Brooks George", "fossil hunting"). |
|
hobby("Clint Rahman", "rail transport modelling"). |
|
hobby("Colette Rahman", "jujitsu"). |
|
hobby("Courtney Parkinson", "beauty pageants"). |
|
hobby("Dalton Parkinson", "softball"). |
|
hobby("Dollie Barbee", "golfing"). |
|
hobby("Elicia Barbee", "inline skating"). |
|
hobby("Elyse Barbee", "radio-controlled model collecting"). |
|
hobby("Emma George", "videography"). |
|
hobby("Garth Kean", "butterfly watching"). |
|
hobby("Guadalupe Barbee", "learning"). |
|
hobby("Jenni Felker", "business"). |
|
hobby("Karolyn Lance", "curling"). |
|
hobby("Kelley Barbee", "magnet fishing"). |
|
hobby("Kenny Barbee", "pickleball"). |
|
hobby("Kirk Lo", "shuffleboard"). |
|
hobby("Konstantin Barbee", "geocaching"). |
|
hobby("Korey Kean", "trade fair visiting"). |
|
hobby("Krystle Barbee", "lapel pins"). |
|
hobby("Kurt Parkinson", "rock balancing"). |
|
hobby("Latosha Rahman", "breakdancing"). |
|
hobby("Leonila Parkinson", "audiophile"). |
|
hobby("Lesley Barbee", "dairy farming"). |
|
hobby("Lyndon Barbee", "research"). |
|
hobby("Marvin Hope", "mineral collecting"). |
|
hobby("Merrill Kean", "research"). |
|
hobby("Mitchel George", "mineral collecting"). |
|
hobby("Nettie Barbee", "learning"). |
|
hobby("Rocco Lance", "magnet fishing"). |
|
hobby("Rory George", "whale watching"). |
|
hobby("Royce Lo", "research"). |
|
hobby("Rudy Barbee", "fusilately"). |
|
hobby("Solomon Rahman", "shortwave listening"). |
|
hobby("Tracey Kean", "microscopy"). |
|
hobby("Twyla Parkinson", "life science"). |
|
hobby("Tyrone Parkinson", "meditation"). |
|
hobby("Wallace Ragland", "science and technology studies"). |
|
hobby("Walter Hope", "frisbee"). |
|
hobby("Wanda Lo", "satellite watching"). |
|
hobby("Wanita Hope", "chemistry"). |
|
hobby("Willie Parkinson", "ballet dancing"). |
|
hobby("Yasmin Ragland", "antiquities"). |
|
|
|
granddaughter(X, Y) :- |
|
grandchild(X, Y), |
|
female(Y). |
|
|
|
grandson(X, Y) :- |
|
grandchild(X, Y), |
|
male(Y). |
|
|
|
:- dynamic job/2. |
|
|
|
job("Abdul Felker", "police officer"). |
|
job("Adolph Barbee", "community education officer"). |
|
job("Alice Lance", "herbalist"). |
|
job("Allie Barbee", "podiatrist"). |
|
job("Allison Barbee", "prison officer"). |
|
job("Alvin Lance", "animal technologist"). |
|
job("Andres Barbee", "leisure centre manager"). |
|
job("Andrew Parkinson", "speech and language therapist"). |
|
job("Brooks George", "dietitian"). |
|
job("Clint Rahman", "amenity horticulturist"). |
|
job("Colette Rahman", "theatre stage manager"). |
|
job("Courtney Parkinson", "hydrologist"). |
|
job("Dalton Parkinson", "learning mentor"). |
|
job("Dollie Barbee", "location manager"). |
|
job("Elicia Barbee", "chartered management accountant"). |
|
job("Elyse Barbee", "plant breeder"). |
|
job("Emma George", "advertising account executive"). |
|
job("Garth Kean", "tourism officer"). |
|
job("Guadalupe Barbee", "civil service fast streamer"). |
|
job("Jenni Felker", "designer"). |
|
job("Karolyn Lance", "development worker"). |
|
job("Kelley Barbee", "tourist information centre manager"). |
|
job("Kenny Barbee", "community education officer"). |
|
job("Kirk Lo", "farm manager"). |
|
job("Konstantin Barbee", "doctor"). |
|
job("Korey Kean", "newspaper journalist"). |
|
job("Krystle Barbee", "customer service manager"). |
|
job("Kurt Parkinson", "public house manager"). |
|
job("Latosha Rahman", "exercise physiologist"). |
|
job("Leonila Parkinson", "early years teacher"). |
|
job("Lesley Barbee", "chief executive officer"). |
|
job("Lyndon Barbee", "bookseller"). |
|
job("Marvin Hope", "physiotherapist"). |
|
job("Merrill Kean", "occupational hygienist"). |
|
job("Mitchel George", "advertising copywriter"). |
|
job("Nettie Barbee", "radiographer"). |
|
job("Rocco Lance", "mining engineer"). |
|
job("Rory George", "warden"). |
|
job("Royce Lo", "regulatory affairs officer"). |
|
job("Rudy Barbee", "location manager"). |
|
job("Solomon Rahman", "producer"). |
|
job("Tracey Kean", "teaching laboratory technician"). |
|
job("Twyla Parkinson", "orthoptist"). |
|
job("Tyrone Parkinson", "agricultural consultant"). |
|
job("Wallace Ragland", "quarry manager"). |
|
job("Walter Hope", "risk analyst"). |
|
job("Wanda Lo", "physiological scientist"). |
|
job("Wanita Hope", "equality and diversity officer"). |
|
job("Willie Parkinson", "firefighter"). |
|
job("Yasmin Ragland", "purchasing manager"). |
|
|
|
great_uncle(X, Y) :- |
|
grandparent(X, A), |
|
brother(A, Y). |
|
|
|
:- dynamic save_all_clauses_to_file/1. |
|
|
|
save_all_clauses_to_file(A) :- |
|
open(A, write, B), |
|
set_output(B), |
|
listing, |
|
close(B). |
|
|
|
:- dynamic term_expansion/4. |
|
:- multifile term_expansion/4. |
|
|
|
|
|
grandchild(X, Y) :- |
|
grandparent(Y, X). |
|
|
|
:- dynamic dob/2. |
|
|
|
dob("Abdul Felker", "0895-03-24"). |
|
dob("Adolph Barbee", "0980-08-29"). |
|
dob("Alice Lance", "0951-04-07"). |
|
dob("Allie Barbee", "0928-07-23"). |
|
dob("Allison Barbee", "1005-06-23"). |
|
dob("Alvin Lance", "0950-05-19"). |
|
dob("Andres Barbee", "0977-09-16"). |
|
dob("Andrew Parkinson", "0952-04-16"). |
|
dob("Brooks George", "1006-06-23"). |
|
dob("Clint Rahman", "0866-11-02"). |
|
dob("Colette Rahman", "0861-05-02"). |
|
dob("Courtney Parkinson", "0954-06-24"). |
|
dob("Dalton Parkinson", "0984-02-16"). |
|
dob("Dollie Barbee", "0975-03-08"). |
|
dob("Elicia Barbee", "1040-03-27"). |
|
dob("Elyse Barbee", "1033-12-12"). |
|
dob("Emma George", "0978-10-20"). |
|
dob("Garth Kean", "0954-09-11"). |
|
dob("Guadalupe Barbee", "0950-11-19"). |
|
dob("Jenni Felker", "0896-03-17"). |
|
dob("Karolyn Lance", "0924-11-06"). |
|
dob("Kelley Barbee", "0952-08-19"). |
|
dob("Kenny Barbee", "0953-06-18"). |
|
dob("Kirk Lo", "1091-03-24"). |
|
dob("Konstantin Barbee", "1007-05-04"). |
|
dob("Korey Kean", "0984-12-02"). |
|
dob("Krystle Barbee", "1008-12-24"). |
|
dob("Kurt Parkinson", "0924-12-27"). |
|
dob("Latosha Rahman", "0840-02-22"). |
|
dob("Leonila Parkinson", "0924-09-18"). |
|
dob("Lesley Barbee", "1067-06-07"). |
|
dob("Lyndon Barbee", "1036-01-09"). |
|
dob("Marvin Hope", "1013-11-28"). |
|
dob("Merrill Kean", "0981-09-04"). |
|
dob("Mitchel George", "1007-06-03"). |
|
dob("Nettie Barbee", "1032-05-15"). |
|
dob("Rocco Lance", "0924-02-03"). |
|
dob("Rory George", "0974-12-02"). |
|
dob("Royce Lo", "1059-07-07"). |
|
dob("Rudy Barbee", "0927-04-02"). |
|
dob("Solomon Rahman", "0837-10-06"). |
|
dob("Tracey Kean", "0956-03-15"). |
|
dob("Twyla Parkinson", "0949-02-16"). |
|
dob("Tyrone Parkinson", "0982-10-06"). |
|
dob("Wallace Ragland", "0951-01-09"). |
|
dob("Walter Hope", "0980-04-11"). |
|
dob("Wanda Lo", "1059-03-28"). |
|
dob("Wanita Hope", "0977-12-27"). |
|
dob("Willie Parkinson", "0954-09-22"). |
|
dob("Yasmin Ragland", "0952-10-08"). |
|
|
|
:- 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). |
|
|
|
:- multifile prolog_list_goal/1. |
|
|
|
|
|
:- dynamic type/2. |
|
|
|
type("Abdul Felker", person). |
|
type("Adolph Barbee", person). |
|
type("Alice Lance", person). |
|
type("Allie Barbee", person). |
|
type("Allison Barbee", person). |
|
type("Alvin Lance", person). |
|
type("Andres Barbee", person). |
|
type("Andrew Parkinson", person). |
|
type("Brooks George", person). |
|
type("Clint Rahman", person). |
|
type("Colette Rahman", person). |
|
type("Courtney Parkinson", person). |
|
type("Dalton Parkinson", person). |
|
type("Dollie Barbee", person). |
|
type("Elicia Barbee", person). |
|
type("Elyse Barbee", person). |
|
type("Emma George", person). |
|
type("Garth Kean", person). |
|
type("Guadalupe Barbee", person). |
|
type("Jenni Felker", person). |
|
type("Karolyn Lance", person). |
|
type("Kelley Barbee", person). |
|
type("Kenny Barbee", person). |
|
type("Kirk Lo", person). |
|
type("Konstantin Barbee", person). |
|
type("Korey Kean", person). |
|
type("Krystle Barbee", person). |
|
type("Kurt Parkinson", person). |
|
type("Latosha Rahman", person). |
|
type("Leonila Parkinson", person). |
|
type("Lesley Barbee", person). |
|
type("Lyndon Barbee", person). |
|
type("Marvin Hope", person). |
|
type("Merrill Kean", person). |
|
type("Mitchel George", person). |
|
type("Nettie Barbee", person). |
|
type("Rocco Lance", person). |
|
type("Rory George", person). |
|
type("Royce Lo", person). |
|
type("Rudy Barbee", person). |
|
type("Solomon Rahman", person). |
|
type("Tracey Kean", person). |
|
type("Twyla Parkinson", person). |
|
type("Tyrone Parkinson", person). |
|
type("Wallace Ragland", person). |
|
type("Walter Hope", person). |
|
type("Wanda Lo", person). |
|
type("Wanita Hope", person). |
|
type("Willie Parkinson", person). |
|
type("Yasmin Ragland", person). |
|
|
|
grandfather(X, Y) :- |
|
grandparent(X, Y), |
|
male(Y). |
|
|
|
:- dynamic expand_query/4. |
|
:- multifile expand_query/4. |
|
|
|
|
|
:- dynamic attribute/1. |
|
|
|
attribute("police officer"). |
|
attribute("birdwatching"). |
|
attribute("community education officer"). |
|
attribute("geography"). |
|
attribute("herbalist"). |
|
attribute("research"). |
|
attribute("podiatrist"). |
|
attribute("audiophile"). |
|
attribute("prison officer"). |
|
attribute("knowledge/word games"). |
|
attribute("animal technologist"). |
|
attribute("geocaching"). |
|
attribute("leisure centre manager"). |
|
attribute("croquet"). |
|
attribute("speech and language therapist"). |
|
attribute("badminton"). |
|
attribute("dietitian"). |
|
attribute("fossil hunting"). |
|
attribute("amenity horticulturist"). |
|
attribute("rail transport modelling"). |
|
attribute("theatre stage manager"). |
|
attribute("jujitsu"). |
|
attribute("hydrologist"). |
|
attribute("beauty pageants"). |
|
attribute("learning mentor"). |
|
attribute("softball"). |
|
attribute("location manager"). |
|
attribute("golfing"). |
|
attribute("chartered management accountant"). |
|
attribute("inline skating"). |
|
attribute("plant breeder"). |
|
attribute("radio-controlled model collecting"). |
|
attribute("advertising account executive"). |
|
attribute("videography"). |
|
attribute("tourism officer"). |
|
attribute("butterfly watching"). |
|
attribute("civil service fast streamer"). |
|
attribute("learning"). |
|
attribute("designer"). |
|
attribute("business"). |
|
attribute("development worker"). |
|
attribute("curling"). |
|
attribute("tourist information centre manager"). |
|
attribute("magnet fishing"). |
|
attribute("community education officer"). |
|
attribute("pickleball"). |
|
attribute("farm manager"). |
|
attribute("shuffleboard"). |
|
attribute("doctor"). |
|
attribute("geocaching"). |
|
attribute("newspaper journalist"). |
|
attribute("trade fair visiting"). |
|
attribute("customer service manager"). |
|
attribute("lapel pins"). |
|
attribute("public house manager"). |
|
attribute("rock balancing"). |
|
attribute("exercise physiologist"). |
|
attribute("breakdancing"). |
|
attribute("early years teacher"). |
|
attribute("audiophile"). |
|
attribute("chief executive officer"). |
|
attribute("dairy farming"). |
|
attribute("bookseller"). |
|
attribute("research"). |
|
attribute("physiotherapist"). |
|
attribute("mineral collecting"). |
|
attribute("occupational hygienist"). |
|
attribute("research"). |
|
attribute("advertising copywriter"). |
|
attribute("mineral collecting"). |
|
attribute("radiographer"). |
|
attribute("learning"). |
|
attribute("mining engineer"). |
|
attribute("magnet fishing"). |
|
attribute("warden"). |
|
attribute("whale watching"). |
|
attribute("regulatory affairs officer"). |
|
attribute("research"). |
|
attribute("location manager"). |
|
attribute("fusilately"). |
|
attribute("producer"). |
|
attribute("shortwave listening"). |
|
attribute("teaching laboratory technician"). |
|
attribute("microscopy"). |
|
attribute("orthoptist"). |
|
attribute("life science"). |
|
attribute("agricultural consultant"). |
|
attribute("meditation"). |
|
attribute("quarry manager"). |
|
attribute("science and technology studies"). |
|
attribute("risk analyst"). |
|
attribute("frisbee"). |
|
attribute("physiological scientist"). |
|
attribute("satellite watching"). |
|
attribute("equality and diversity officer"). |
|
attribute("chemistry"). |
|
attribute("firefighter"). |
|
attribute("ballet dancing"). |
|
attribute("purchasing manager"). |
|
attribute("antiquities"). |
|
|
|
great_aunt(X, Y) :- |
|
grandparent(X, A), |
|
sister(A, Y). |
|
|
|
grandparent(X, Y) :- |
|
parent(X, Z), |
|
parent(Z, Y). |
|
|
|
grandmother(X, Y) :- |
|
grandparent(X, Y), |
|
female(Y). |
|
|
|
:- dynamic friend_/2. |
|
|
|
friend_("Abdul Felker", "Jenni Felker"). |
|
friend_("Abdul Felker", "Latosha Rahman"). |
|
friend_("Abdul Felker", "Rory George"). |
|
friend_("Abdul Felker", "Rudy Barbee"). |
|
friend_("Abdul Felker", "Tyrone Parkinson"). |
|
friend_("Adolph Barbee", "Alice Lance"). |
|
friend_("Adolph Barbee", "Kenny Barbee"). |
|
friend_("Adolph Barbee", "Wallace Ragland"). |
|
friend_("Alice Lance", "Courtney Parkinson"). |
|
friend_("Alice Lance", "Lesley Barbee"). |
|
friend_("Allie Barbee", "Konstantin Barbee"). |
|
friend_("Alvin Lance", "Brooks George"). |
|
friend_("Alvin Lance", "Karolyn Lance"). |
|
friend_("Alvin Lance", "Rocco Lance"). |
|
friend_("Alvin Lance", "Tyrone Parkinson"). |
|
friend_("Alvin Lance", "Wanita Hope"). |
|
friend_("Andres Barbee", "Dollie Barbee"). |
|
friend_("Andres Barbee", "Karolyn Lance"). |
|
friend_("Andres Barbee", "Lesley Barbee"). |
|
friend_("Andres Barbee", "Marvin Hope"). |
|
friend_("Andres Barbee", "Wanita Hope"). |
|
friend_("Andrew Parkinson", "Courtney Parkinson"). |
|
friend_("Andrew Parkinson", "Krystle Barbee"). |
|
friend_("Andrew Parkinson", "Wanita Hope"). |
|
friend_("Brooks George", "Dalton Parkinson"). |
|
friend_("Brooks George", "Emma George"). |
|
friend_("Brooks George", "Guadalupe Barbee"). |
|
friend_("Brooks George", "Latosha Rahman"). |
|
friend_("Brooks George", "Nettie Barbee"). |
|
friend_("Brooks George", "Rocco Lance"). |
|
friend_("Brooks George", "Solomon Rahman"). |
|
friend_("Clint Rahman", "Leonila Parkinson"). |
|
friend_("Clint Rahman", "Walter Hope"). |
|
friend_("Colette Rahman", "Emma George"). |
|
friend_("Courtney Parkinson", "Elicia Barbee"). |
|
friend_("Courtney Parkinson", "Emma George"). |
|
friend_("Dalton Parkinson", "Latosha Rahman"). |
|
friend_("Elicia Barbee", "Solomon Rahman"). |
|
friend_("Elicia Barbee", "Twyla Parkinson"). |
|
friend_("Elicia Barbee", "Wallace Ragland"). |
|
friend_("Elicia Barbee", "Yasmin Ragland"). |
|
friend_("Elyse Barbee", "Rocco Lance"). |
|
friend_("Emma George", "Karolyn Lance"). |
|
friend_("Emma George", "Lesley Barbee"). |
|
friend_("Garth Kean", "Kelley Barbee"). |
|
friend_("Garth Kean", "Korey Kean"). |
|
friend_("Garth Kean", "Walter Hope"). |
|
friend_("Guadalupe Barbee", "Korey Kean"). |
|
friend_("Jenni Felker", "Korey Kean"). |
|
friend_("Jenni Felker", "Wanda Lo"). |
|
friend_("Kelley Barbee", "Latosha Rahman"). |
|
friend_("Kelley Barbee", "Leonila Parkinson"). |
|
friend_("Kelley Barbee", "Rory George"). |
|
friend_("Kenny Barbee", "Latosha Rahman"). |
|
friend_("Kenny Barbee", "Lesley Barbee"). |
|
friend_("Kirk Lo", "Lesley Barbee"). |
|
friend_("Kirk Lo", "Lyndon Barbee"). |
|
friend_("Kirk Lo", "Marvin Hope"). |
|
friend_("Kirk Lo", "Yasmin Ragland"). |
|
friend_("Konstantin Barbee", "Tracey Kean"). |
|
friend_("Krystle Barbee", "Leonila Parkinson"). |
|
friend_("Krystle Barbee", "Twyla Parkinson"). |
|
friend_("Kurt Parkinson", "Latosha Rahman"). |
|
friend_("Kurt Parkinson", "Marvin Hope"). |
|
friend_("Kurt Parkinson", "Walter Hope"). |
|
friend_("Kurt Parkinson", "Wanita Hope"). |
|
friend_("Kurt Parkinson", "Yasmin Ragland"). |
|
friend_("Leonila Parkinson", "Royce Lo"). |
|
friend_("Leonila Parkinson", "Rudy Barbee"). |
|
friend_("Leonila Parkinson", "Solomon Rahman"). |
|
friend_("Lyndon Barbee", "Tyrone Parkinson"). |
|
friend_("Lyndon Barbee", "Wanda Lo"). |
|
friend_("Mitchel George", "Wallace Ragland"). |
|
friend_("Rudy Barbee", "Walter Hope"). |
|
friend_("Rudy Barbee", "Yasmin Ragland"). |
|
friend_("Solomon Rahman", "Tyrone Parkinson"). |
|
friend_("Solomon Rahman", "Wanda Lo"). |
|
friend_("Tracey Kean", "Twyla Parkinson"). |
|
friend_("Wanita Hope", "Willie Parkinson"). |
|
|
|
friend(X, Y) :- |
|
friend_(X, Y). |
|
friend(X, Y) :- |
|
friend_(Y, X). |
|
|
|
niece(X, Y) :- |
|
sibling(X, A), |
|
daughter(A, Y). |
|
|
|
nephew(X, Y) :- |
|
sibling(X, A), |
|
son(A, Y). |
|
|
|
brother_in_law(X, Y) :- |
|
married(X, A), |
|
brother(A, Y). |
|
|
|
:- multifile message_property/2. |
|
|
|
|
|
sister_in_law(X, Y) :- |
|
married(X, A), |
|
sister(A, Y). |
|
|
|
wife(X, Y) :- |
|
married(X, Y), |
|
female(Y). |
|
|
|
husband(X, Y) :- |
|
married(X, Y), |
|
male(Y). |
|
|
|
daughter_in_law(X, Y) :- |
|
child(X, A), |
|
wife(A, Y). |
|
|
|
son_in_law(X, Y) :- |
|
child(X, A), |
|
husband(A, Y). |
|
|
|
son(X, Y) :- |
|
child(X, Y), |
|
male(Y). |
|
|
|
female(X) :- |
|
gender(X, "female"). |
|
|
|
daughter(X, Y) :- |
|
child(X, Y), |
|
female(Y). |
|
|
|
father_in_law(X, Y) :- |
|
married(X, A), |
|
father(A, Y). |
|
|
|
mother_in_law(X, Y) :- |
|
married(X, A), |
|
mother(A, Y). |
|
|
|
father(X, Y) :- |
|
parent(X, Y), |
|
male(Y). |
|
|
|
:- multifile prolog_predicate_name/2. |
|
|
|
|
|
child(X, Y) :- |
|
parent(Y, X). |
|
|
|
male_first_cousin_once_removed(X, Y) :- |
|
cousin(X, A), |
|
son(A, Y), |
|
X\=Y. |
|
|
|
:- multifile prolog_clause_name/2. |
|
|
|
|
|
:- dynamic expand_answer/2. |
|
:- multifile expand_answer/2. |
|
|
|
|
|
:- dynamic exception/3. |
|
:- multifile exception/3. |
|
|
|
|
|
female_first_cousin_once_removed(X, Y) :- |
|
cousin(X, A), |
|
daughter(A, Y), |
|
X\=Y. |
|
|
|
brother(X, Y) :- |
|
sibling(X, Y), |
|
male(Y). |
|
|
|
mother(X, Y) :- |
|
parent(X, Y), |
|
female(Y). |
|
|
|
male_second_cousin(X, Y) :- |
|
parent(X, A), |
|
parent(Y, B), |
|
cousin(A, B), |
|
male(Y), |
|
X\=Y. |
|
|
|
:- dynamic message_hook/3. |
|
:- multifile message_hook/3. |
|
|
|
|
|
female_second_cousin(X, Y) :- |
|
parent(X, A), |
|
parent(Y, B), |
|
cousin(A, B), |
|
female(Y), |
|
X\=Y. |
|
|
|
married(X, Y) :- |
|
parent(Child, X), |
|
parent(Child, Y), |
|
X\=Y. |
|
|
|
male(X) :- |
|
gender(X, "male"). |
|
|
|
:- 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). |
|
|
|
sister(X, Y) :- |
|
sibling(X, Y), |
|
female(Y). |
|
|
|
male_cousin(X, Y) :- |
|
cousin(X, Y), |
|
male(Y). |
|
|
|
:- dynamic nonbinary/1. |
|
|
|
nonbinary(X) :- |
|
gender(X, "nonbinary"). |
|
|
|
female_cousin(X, Y) :- |
|
cousin(X, Y), |
|
female(Y). |
|
|
|
sibling(X, Y) :- |
|
parent(X, A), |
|
parent(Y, A), |
|
X\=Y. |
|
|
|
:- dynamic portray/1. |
|
:- multifile portray/1. |
|
|
|
|
|
:- dynamic prolog_load_file/2. |
|
:- multifile prolog_load_file/2. |
|
|
|
|
|
:- dynamic goal_expansion/2. |
|
:- multifile goal_expansion/2. |
|
|
|
|
|
:- dynamic parent/2. |
|
|
|
parent("Adolph Barbee", "Kelley Barbee"). |
|
parent("Adolph Barbee", "Kenny Barbee"). |
|
parent("Alice Lance", "Karolyn Lance"). |
|
parent("Alice Lance", "Rocco Lance"). |
|
parent("Allison Barbee", "Andres Barbee"). |
|
parent("Allison Barbee", "Dollie Barbee"). |
|
parent("Alvin Lance", "Karolyn Lance"). |
|
parent("Alvin Lance", "Rocco Lance"). |
|
parent("Andres Barbee", "Kelley Barbee"). |
|
parent("Andres Barbee", "Kenny Barbee"). |
|
parent("Andrew Parkinson", "Kurt Parkinson"). |
|
parent("Andrew Parkinson", "Leonila Parkinson"). |
|
parent("Brooks George", "Emma George"). |
|
parent("Brooks George", "Rory George"). |
|
parent("Clint Rahman", "Latosha Rahman"). |
|
parent("Clint Rahman", "Solomon Rahman"). |
|
parent("Courtney Parkinson", "Karolyn Lance"). |
|
parent("Courtney Parkinson", "Rocco Lance"). |
|
parent("Dalton Parkinson", "Courtney Parkinson"). |
|
parent("Dalton Parkinson", "Willie Parkinson"). |
|
parent("Dollie Barbee", "Wallace Ragland"). |
|
parent("Dollie Barbee", "Yasmin Ragland"). |
|
parent("Elicia Barbee", "Konstantin Barbee"). |
|
parent("Elicia Barbee", "Krystle Barbee"). |
|
parent("Emma George", "Courtney Parkinson"). |
|
parent("Emma George", "Willie Parkinson"). |
|
parent("Guadalupe Barbee", "Allie Barbee"). |
|
parent("Guadalupe Barbee", "Rudy Barbee"). |
|
parent("Jenni Felker", "Clint Rahman"). |
|
parent("Jenni Felker", "Colette Rahman"). |
|
parent("Karolyn Lance", "Abdul Felker"). |
|
parent("Karolyn Lance", "Jenni Felker"). |
|
parent("Kelley Barbee", "Karolyn Lance"). |
|
parent("Kelley Barbee", "Rocco Lance"). |
|
parent("Kenny Barbee", "Allie Barbee"). |
|
parent("Kenny Barbee", "Rudy Barbee"). |
|
parent("Kirk Lo", "Royce Lo"). |
|
parent("Kirk Lo", "Wanda Lo"). |
|
parent("Konstantin Barbee", "Andres Barbee"). |
|
parent("Konstantin Barbee", "Dollie Barbee"). |
|
parent("Korey Kean", "Garth Kean"). |
|
parent("Korey Kean", "Tracey Kean"). |
|
parent("Krystle Barbee", "Walter Hope"). |
|
parent("Krystle Barbee", "Wanita Hope"). |
|
parent("Lesley Barbee", "Elyse Barbee"). |
|
parent("Lesley Barbee", "Lyndon Barbee"). |
|
parent("Lyndon Barbee", "Konstantin Barbee"). |
|
parent("Lyndon Barbee", "Krystle Barbee"). |
|
parent("Marvin Hope", "Walter Hope"). |
|
parent("Marvin Hope", "Wanita Hope"). |
|
parent("Merrill Kean", "Garth Kean"). |
|
parent("Merrill Kean", "Tracey Kean"). |
|
parent("Mitchel George", "Emma George"). |
|
parent("Mitchel George", "Rory George"). |
|
parent("Nettie Barbee", "Konstantin Barbee"). |
|
parent("Nettie Barbee", "Krystle Barbee"). |
|
parent("Tracey Kean", "Karolyn Lance"). |
|
parent("Tracey Kean", "Rocco Lance"). |
|
parent("Twyla Parkinson", "Kurt Parkinson"). |
|
parent("Twyla Parkinson", "Leonila Parkinson"). |
|
parent("Tyrone Parkinson", "Courtney Parkinson"). |
|
parent("Tyrone Parkinson", "Willie Parkinson"). |
|
parent("Wanda Lo", "Elyse Barbee"). |
|
parent("Wanda Lo", "Lyndon Barbee"). |
|
parent("Willie Parkinson", "Kurt Parkinson"). |
|
parent("Willie Parkinson", "Leonila Parkinson"). |
|
|
|
cousin(X, Y) :- |
|
parent(X, A), |
|
parent(Y, B), |
|
sibling(A, B), |
|
X\=Y. |
|
|
|
uncle(X, Y) :- |
|
parent(X, A), |
|
brother(A, Y). |
|
|
|
:- dynamic resource/3. |
|
:- multifile resource/3. |
|
|
|
|
|
:- thread_local thread_message_hook/3. |
|
:- dynamic thread_message_hook/3. |
|
:- volatile thread_message_hook/3. |
|
|
|
|
|
aunt(X, Y) :- |
|
parent(X, A), |
|
sister(A, Y). |
|
|
|
second_uncle(X, Y) :- |
|
great_grandparent(X, A), |
|
brother(A, Y). |
|
|
|
:- dynamic gender/2. |
|
|
|
gender("Abdul Felker", "male"). |
|
gender("Adolph Barbee", "male"). |
|
gender("Alice Lance", "female"). |
|
gender("Allie Barbee", "female"). |
|
gender("Allison Barbee", "female"). |
|
gender("Alvin Lance", "male"). |
|
gender("Andres Barbee", "male"). |
|
gender("Andrew Parkinson", "male"). |
|
gender("Brooks George", "male"). |
|
gender("Clint Rahman", "male"). |
|
gender("Colette Rahman", "female"). |
|
gender("Courtney Parkinson", "female"). |
|
gender("Dalton Parkinson", "male"). |
|
gender("Dollie Barbee", "female"). |
|
gender("Elicia Barbee", "female"). |
|
gender("Elyse Barbee", "female"). |
|
gender("Emma George", "female"). |
|
gender("Garth Kean", "male"). |
|
gender("Guadalupe Barbee", "male"). |
|
gender("Jenni Felker", "female"). |
|
gender("Karolyn Lance", "female"). |
|
gender("Kelley Barbee", "female"). |
|
gender("Kenny Barbee", "male"). |
|
gender("Kirk Lo", "male"). |
|
gender("Konstantin Barbee", "male"). |
|
gender("Korey Kean", "male"). |
|
gender("Krystle Barbee", "female"). |
|
gender("Kurt Parkinson", "male"). |
|
gender("Latosha Rahman", "female"). |
|
gender("Leonila Parkinson", "female"). |
|
gender("Lesley Barbee", "male"). |
|
gender("Lyndon Barbee", "male"). |
|
gender("Marvin Hope", "male"). |
|
gender("Merrill Kean", "male"). |
|
gender("Mitchel George", "male"). |
|
gender("Nettie Barbee", "female"). |
|
gender("Rocco Lance", "male"). |
|
gender("Rory George", "male"). |
|
gender("Royce Lo", "male"). |
|
gender("Rudy Barbee", "male"). |
|
gender("Solomon Rahman", "male"). |
|
gender("Tracey Kean", "female"). |
|
gender("Twyla Parkinson", "female"). |
|
gender("Tyrone Parkinson", "male"). |
|
gender("Wallace Ragland", "male"). |
|
gender("Walter Hope", "male"). |
|
gender("Wanda Lo", "female"). |
|
gender("Wanita Hope", "female"). |
|
gender("Willie Parkinson", "male"). |
|
gender("Yasmin Ragland", "female"). |
|
|
|
second_aunt(X, Y) :- |
|
great_grandparent(X, A), |
|
sister(A, Y). |
|
|
|
great_grandson(X, Y) :- |
|
great_grandchild(X, Y), |
|
male(Y). |
|
|
|
:- dynamic pyrun/2. |
|
|
|
pyrun(A, B) :- |
|
read_term_from_atom(A, C, [variable_names(B)]), |
|
call(C). |
|
|
|
great_granddaughter(X, Y) :- |
|
great_grandchild(X, Y), |
|
female(Y). |
|
|
|
:- dynamic resource/2. |
|
:- multifile resource/2. |
|
|
|
|