/usr/share/Yap/problog_examples/office.pl is in yap 6.2.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | %%% -*- Mode: Prolog; -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ProbLog program describing an office window
% example for using hybrid ProbLog
% $Id: office.pl 4970 2010-10-21 08:47:36Z bernd $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:- use_module(library(problog)).
(W,gaussian(2,1)) :: width(W).
(L,gaussian(9,3)) :: length(L).
0.8 :: office_has_window.
0.001 :: corridor_has_window.
in_office :- width(W),length(L), in_interval(W,2,4), in_interval(L,2,4).
in_corridor :- width(W),length(L), below(W,2.5), above(L,3).
room_has_window:-
in_office, office_has_window.
room_has_window:-
in_corridor,corridor_has_window.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% query ?- problog_exact(room_has_window, Prob, Status).
% Prob = 0.01517076,
% Status = ok ?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|