forked from igler/ESProNa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader.lgt
184 lines (149 loc) · 6.84 KB
/
loader.lgt
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ESProNa - Modeling, Execution and Navigation of Declarative Business Processes
% Release 0.8
%
% Copyright (c) 2007-2012 Michael Igler. All Rights Reserved.
% ESProNa is free software. You can redistribute it and/or modify it under the terms
% of the "Artistic License 2.0" as published by The Perl Foundation.
% Consult the "LICENSE.txt" file for details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:- multifile(logtalk_library_path/2).
:- dynamic(logtalk_library_path/2).
:- use_module(library(ugraphs)).
:- use_module(library(aggregate)).
:- use_module(library(clpfd)).
:- use_module(library(lists)).
% JSON support
:- use_module(library('http/json')).
:- use_module(library('http/json_convert')).
:- use_module(library('http/http_json')).
% REST support
:- use_module(library('http/thread_httpd')).
:- use_module(library('http/http_wrapper')).
:- use_module(library('http/http_dispatch')).
:- use_module(library('http/html_write')).
logtalk_library_path(esprona, '$ESProNa/').
logtalk_library_path(esprona_library, esprona('library/')).
logtalk_library_path(esprona_contributions, esprona('contributions/')).
logtalk_library_path(rest, esprona_library('REST/')).
logtalk_library_path(planning, esprona_library('planning/')).
logtalk_library_path(process, esprona_library('process/')).
logtalk_library_path(state, esprona_library('state/')).
logtalk_library_path(utilities, esprona_library('utilities/')).
logtalk_library_path(solvers, planning('solvers/')).
logtalk_library_path(visualize, planning('visualize/')).
logtalk_library_path(debug, esprona_contributions('debug/')).
logtalk_library_path(performance, esprona_contributions('performance/')).
logtalk_library_path(popm, process('popm/')).
logtalk_library_path(fu_perspective, popm('functional_perspective/')).
logtalk_library_path(be_perspective, popm('behavioral_perspective/')).
logtalk_library_path(org_perspective, popm('organizational_perspective/')).
logtalk_library_path(data_perspective, popm('data_perspective/')).
logtalk_library_path(op_perspective, popm('operational_perspective/')).
logtalk_library_path(heuristics, popm('heuristics/')).
% location process models
logtalk_library_path(process_models, esprona('process_models/')).
logtalk_library_path(set_up_surgery_plan_extended, process_models('set_up_surgery_plan_extended/')).
logtalk_library_path(be_dep_test, process_models('be_dep_test/')).
% location unit tests
logtalk_library_path(unit_tests, esprona('unit_tests/')).
logtalk_library_path(unit_test_1, unit_tests('unit_test_1/')).
:- initialization((
set_logtalk_flag(portability, silent),
% set_logtalk_flag(plredef, silent),
set_prolog_flag(verbose_load, false),
set_prolog_flag(verbose, silent),
logtalk_load(library(types_loader)),
logtalk_load(library(metapredicates_loader)),
logtalk_load(library(dates_loader)),
logtalk_load(roots(loader)),
write(' '), nl,
write(' ___________ ___________________ _______ '), nl,
write(' \\_ _____// _____/\\______ \\_______ ____ \\ \\ _____ '), nl,
write(' | __)_ \\_____ \\ | ___/\\_ __ \\/ _ \\ / | \\\\__ \\ '), nl,
write(' | \\/ \\ | | | | \\( <_> ) | \\/ __ \\_ '), nl,
write(' /_______ /_______ / |____| |__| \\____/\\____|__ (____ / '), nl,
write(' \\/ \\/ \\/ \\/ '), nl,
write('+++ Modeling, Execution and Navigation of Declarative Business Processes +++ '), nl,
write(' '), nl,
write('+++ Loading (modified) OWL2 parser Thea2...'),
ensure_loaded('contributions/thea2/owl2_to_logtalk.pl'),
ensure_loaded('contributions/thea2/swrl_rdf_hooks'),
nl,
write('+++ Loading state-space definitions...'),
logtalk_load(state(model_state)),
logtalk_load(state(process_state)),
logtalk_load(solvers(state_space)),
logtalk_load(solvers(heuristic_state_space)),
nl,
write('+++ Loading debugging tools...'),
logtalk_load(debug(hooks)),
nl,
write('+++ Loading performance measurement tools...'),
logtalk_load(performance(performance)),
nl,
write('+++ Loading heuristics and solvers...'),
logtalk_load(solvers(esprona_search_strategy)),
logtalk_load(solvers(esprona_blind_search)),
logtalk_load(solvers(esprona_breadth_first), [events(allow)]),
logtalk_load(solvers(esprona_depth_first), [events(allow)]),
logtalk_load(heuristics(heuristic_protocol)),
logtalk_load(heuristics(heuristic_perspective)),
logtalk_load(solvers(esprona_heuristic_search)),
logtalk_load(solvers(esprona_best_first), [events(allow)]),
logtalk_load(solvers(esprona_hill_climbing), [events(allow)]),
nl,
write('+++ Loading helper predicates/utilities...'),
logtalk_load(utilities(helper_predicates)),
logtalk_load(utilities(export_state_transitions)),
nl,
write('+++ Loading POPM Functional Perspective definitions...'),
logtalk_load(fu_perspective(functional_constraint)),
logtalk_load(fu_perspective(functional_heuristic)),
nl,
write('+++ Loading POPM Behavioral Perspective definitions...'),
logtalk_load(be_perspective(behavioral_constraint)),
logtalk_load(be_perspective(behavioral_heuristic)),
nl,
write('+++ Loading POPM Organizational Perspective definitions...'),
logtalk_load(org_perspective(organizational_constraint)),
logtalk_load(org_perspective(organizational_heuristic)),
nl,
write('+++ Loading POPM Data Perspective definitions...'),
logtalk_load(data_perspective(data_constraint)),
logtalk_load(data_perspective(data_heuristic)),
nl,
write('+++ Loading POPM Operational Perspective definitions...'),
logtalk_load(op_perspective(operational_constraint)),
logtalk_load(op_perspective(operational_heuristic)),
nl,
write('+++ Loading process and constraint predicates definitions...'),
logtalk_load(process(process)),
nl,
write('+++ Loading process model definitions...'),
logtalk_load(process(process_model)),
nl,
write('+++ Loading planning components...'),
logtalk_load(planning(process_planning), [hook(hook_production), events(allow)]),
nl,
write('+++ Loading visualization (dot-export)...'),
logtalk_load(visualize(graphviz)),
nl,
write('+++ Loading REST/JSON interface...'),
logtalk_load(rest(rest)),
consult('./library/REST/rest_proxy_module'),
nl,
write('+++ Starting ESProNa-server on port 2600...'),
rest::start_server(2600),
nl,
/*
write('+++ Generating architecture overview...'),
logtalk_load(diagrams(loader)),
diagram::rlibrary(esprona),
shell('dot -Tpdf esprona.dot > esprona.pdf'),
nl,
*/
nl
)).