Closed wouterbeek closed 9 years ago
yes, should be semidet, though I can't find that code!
It's in demo/weblogdemo:#67
:
%% start_server is nondet
%
% Starts the weblog demo server.
% nondet because the server might not start
%
start_server:-
setting(http:port, Port),
start_server(Port).
start_server(Port):-
must_be(between(1000,9999), Port),
http_server_property(Port, start_time(StartTime)), !,
print_message(informational, server_running(Port,StartTime)).
start_server(Port):-
% @tbd for unclear reasons, uncommenting this breaks the Google Maps demo.
%html_set_options([dialect(xhtml)]),
http_server(http_dispatch, [port(Port), timeout(3600)]),
at_halt(stop_server(Port)),
http_log('Starting weblog demo on port ~w~n', [Port]),
print_message(informational, server_started(Port)).
I don't think this is semi-deterministic.
PS: I was expecting that it were easy to link to code lines in a commit on Github, but I couldn't figure out how to do it.
Your version's apparently out of date. Latest on my machine has renamed this predicate to start.
About starting the server (predicate
start_server/1
:My questions:
det
.semidet
?