Advertisement
logicmoo

?- kif_to_boxlog( all(x,((musiclover(x) & enjoy(x,'Bach'))

Dec 1st, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 2.65 KB | None | 0 0
  1. ?- kif_to_boxlog( all(x,((musiclover(x) & enjoy(x,'Bach'))  => (  (dislike(x,'Wagner') & all(y,exists(z,  dislike(y,z)) => think_philistine(x,y)))))),O).
  2.  
  3.  
  4.  
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  7. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  8. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. % cnf :-
  10. %       (~musiclover('?X')v~enjoy('?X', 'Bach')v dislike('?X', 'Wagner'))& (~musiclover('?X')v~enjoy('?X', 'Bach')v (~dislike('?Y', '?Z')v think_philistine('?X', '?Y'))).
  11. % boxlog :-
  12. %
  13. %       [ (~musiclover('?X'):-enjoy('?X', 'Bach'), ~dislike('?X', 'Wagner')),
  14. %         (~musiclover('?X'):-enjoy('?X', 'Bach'), dislike('?Y', '?Z'), ~think_philistine('?X', '?Y')),
  15. %         (~dislike('?Y', '?Z'):-musiclover('?X'), enjoy('?X', 'Bach'), ~think_philistine('?X', '?Y')),
  16. %         (~enjoy('?X', 'Bach'):-musiclover('?X'), ~dislike('?X', 'Wagner')),
  17. %         (~enjoy('?X', 'Bach'):-musiclover('?X'), dislike('?Y', '?Z'), ~think_philistine('?X', '?Y')),
  18. %         (dislike('?X', 'Wagner'):-musiclover('?X'), enjoy('?X', 'Bach')),
  19. %         (think_philistine('?X', '?Y'):-musiclover('?X'), enjoy('?X', 'Bach'), dislike('?Y', '?Z'))
  20. %       ].
  21. % preview :-
  22. %
  23. %       [ (enjoy('?X', 'Bach'), ~dislike('?X', 'Wagner'), {is_unit('?X')}==> ~musiclover('?X')),
  24. %         (enjoy('?X', 'Bach'), dislike('?Y', '?Z'), ~think_philistine('?X', '?Y'), {is_unit('?X')}-> ~musiclover('?X')),
  25. %         (musiclover('?X'), enjoy('?X', 'Bach'), ~think_philistine('?X', '?Y'), {is_unit('?Y')}-> ~dislike('?Y', '?Z')),
  26. %         (musiclover('?X'), ~dislike('?X', 'Wagner'), {is_unit('?X')}==> ~enjoy('?X', 'Bach')),
  27. %         (musiclover('?X'), dislike('?Y', '?Z'), ~think_philistine('?X', '?Y'), {is_unit('?X')}-> ~enjoy('?X', 'Bach')),
  28. %         (musiclover('?X'), enjoy('?X', 'Bach'), {is_unit('?X')}==>dislike('?X', 'Wagner')),
  29. %         (musiclover('?X'), enjoy('?X', 'Bach'), dislike('?Y', '?Z'), {is_unit('?Y', '?X')}==>think_philistine('?X', '?Y'))
  30. %       ].
  31. O = [(~musiclover(_G2063872):-enjoy(_G2063872, 'Bach'), ~dislike(_G2063872, 'Wagner')),  (~musiclover(_G2063893):-enjoy(_G2063893, 'Bach'), dislike(_G2063904, _G2063905), ~think_philistine(_G2063893, _G2063904)),  (~dislike(_G2063920, _G2063921):-musiclover(_G2063926), enjoy(_G2063926, 'Bach'), ~think_philistine(_G2063926, _G2063920)),  (~enjoy(_G2063947, 'Bach'):-musiclover(_G2063947), ~dislike(_G2063947, 'Wagner')),  (~enjoy(_G2063968, 'Bach'):-musiclover(_G2063968), dislike(_G2063979, _G2063980), ~think_philistine(..., ...)),  (dislike(_G2063993, 'Wagner'):-musiclover(_G2063993), enjoy(_G2063993, 'Bach')),  (think_philistine(_G2064010, _G2064011):-musiclover(...), ..., ...)],
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement