Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------
- Performing Query: Likes[p,ComputerScience]
- query_or(Likes[p,ComputerScience], {})
- -----------------------------
- Rule(premises=[Likes[x,Programming], Likes[x,Math]], conclusion=Likes[x,ComputerScience])
- query_and([Likes[x,Programming], Likes[x,Math]], {'x': 'p'})
- query_or(Likes[p,Programming], {'x': 'p'})
- Rule(premises=[], conclusion=Likes[Steve,Programming])
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Steve'}]
- rest: [Likes[x,Math]]
- query_and([Likes[x,Math]], {'x': 'p', 'p': 'Steve'})
- query_or(Likes[p,Math], {'x': 'p', 'p': 'Steve'})
- Rule(premises=[], conclusion=Likes[Sally,Math])
- query_or(Likes[p,Math], {'x': 'p', 'p': 'Sally'}) return: [{'x': 'p', 'p': 'Sally'}]
- rest: []
- query_and([], {'x': 'p', 'p': 'Sally'})
- query_and([], {'x': 'p', 'p': 'Sally'}) return: [{'x': 'p', 'p': 'Sally'}]
- query_and([Likes[x,Math]], {'x': 'p', 'p': 'Sally'}) return: [{'x': 'p', 'p': 'Sally'}]
- query_and([Likes[x,Programming], Likes[x,Math]], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Sally'}]
- query_and([Likes[x,Programming], Likes[x,Math]], {'x': 'p', 'p': 'Steve'})
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'})
- Rule(premises=[], conclusion=Likes[Steve,Programming])
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Steve'}]
- rest: [Likes[x,Math]]
- query_and([Likes[x,Math]], {'x': 'p', 'p': 'Steve'})
- query_or(Likes[p,Math], {'x': 'p', 'p': 'Steve'})
- Rule(premises=[], conclusion=Likes[Sally,Math])
- query_or(Likes[p,Math], {'x': 'p', 'p': 'Sally'}) return: [{'x': 'p', 'p': 'Sally'}]
- rest: []
- query_and([], {'x': 'p', 'p': 'Sally'})
- query_and([], {'x': 'p', 'p': 'Sally'}) return: [{'x': 'p', 'p': 'Sally'}]
- query_and([Likes[x,Math]], {'x': 'p', 'p': 'Sally'}) return: [{'x': 'p', 'p': 'Sally'}]
- query_and([Likes[x,Programming], Likes[x,Math]], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Sally'}]
- -----------------------------
- Rule(premises=[Likes[x,Programming], Plays[x,ComputerGames]], conclusion=Likes[x,ComputerScience])
- query_and([Likes[x,Programming], Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'})
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'})
- Rule(premises=[], conclusion=Likes[Steve,Programming])
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Steve'}]
- rest: [Plays[x,ComputerGames]]
- query_and([Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'})
- query_or(Plays[p,ComputerGames], {'x': 'p', 'p': 'Steve'})
- query_or(Plays[p,ComputerGames], {'x': 'p', 'p': 'Steve'}) return: []
- query_and([Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'}) return: []
- query_and([Likes[x,Programming], Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'}) return: []
- query_and([Likes[x,Programming], Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'})
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'})
- Rule(premises=[], conclusion=Likes[Steve,Programming])
- query_or(Likes[p,Programming], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Steve'}]
- rest: [Plays[x,ComputerGames]]
- query_and([Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'})
- query_or(Plays[p,ComputerGames], {'x': 'p', 'p': 'Steve'})
- query_or(Plays[p,ComputerGames], {'x': 'p', 'p': 'Steve'}) return: []
- query_and([Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'}) return: []
- query_and([Likes[x,Programming], Plays[x,ComputerGames]], {'x': 'p', 'p': 'Steve'}) return: []
- query_or(Likes[p,ComputerScience], {'x': 'p', 'p': 'Steve'}) return: [{'x': 'p', 'p': 'Sally'}, {'x': 'p', 'p': 'Sally'}]
- Result: [{'p': 'Sally'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement