Commit 8d21af35 authored by Thierry Martinez's avatar Thierry Martinez

Fixed: Check for double initialization.

initialize/0 can now be run several times (doing nothing except the
first time), without leading to a bogus state.
parent 1b117581
...@@ -35,6 +35,13 @@ start :- ...@@ -35,6 +35,13 @@ start :-
do_arguments. do_arguments.
:- dynamic(initialized/0).
initialize :-
initialized,
!.
initialize :- initialize :-
initialize_library_path, initialize_library_path,
set_prolog_flag(allow_variable_name_as_functor, true), set_prolog_flag(allow_variable_name_as_functor, true),
...@@ -46,7 +53,8 @@ initialize :- ...@@ -46,7 +53,8 @@ initialize :-
nb_setval(graph_pdf, 0), nb_setval(graph_pdf, 0),
nb_setval(current_models, []), nb_setval(current_models, []),
load_biocham('library:initial'), load_biocham('library:initial'),
new_model. new_model,
assertz(initialized).
:- dynamic(library_path/1). :- dynamic(library_path/1).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment