No, there is not. But you can try something like:
print_trigger(_/1).
print_trigger(_/2).
...
It will print all events with 1, respectively 2, ..., arguments.
The problem with this approach is that it will print also temporary
events obtained during binarization of CEP that you might not need.
I will add "print_trigger(all_events)." to ETALIS to print all
"defined" events (except the events obtained automatically from
binarization).
Just a parenthesis for how ETALIS works. If you have a rule:
ce <- a seq b seq c.
ETALIS will create binary events:
temp1 <- a seq b
ce <- temp1 seq c.
This is the binarization step that I mentioned above. It adds a
temporary event temp1 to the program.
We can share common subexpressions in CEP, etc.
I understand you want to print only the composed events that you
created. We can do this by saving the predicate symbols that you
created in the program and printing their instances.
Paul.
Hi,
I added code to support a new declaration:
print_trigger(all_defined_events).
Please update your copy of ETALIS form the SVN repository and see the
example in etalis/examples/print_all_defined_events
Paul.
I would write a procedure inside the file that selects to print all
events except some events.
You can also put a flag "printing_on_1/1". When it's on, it prints
(you can eliminate this flag if you wish).
I put an example in:
etalis\examples\print_selected_events_01
:- dynamic(printing_on_1/1), assert(printing_on_1(on)).
print_trigger(Event) :-
printing_on_1(on),
(
( functor(Event,Functor,Arity),
Functor\='/',
Functor\=all_defined_events,
EventSymbol=Functor/Arity,
! );
EventSymbol=Event
),
EventSymbol \= all_defined_events,
EventSymbol \= d/1,
EventSymbol \= e/1.
d(X) <- a(X).
e(X) <- a(X).
f(X) <- a(X).
g(X) <- a(X).
Paul.
both
print_trigger(_/_).
and
print_trigger(_/0).
are working.
I just tested them in etalis/examples/sequence_01
print_trigger(_/_).
c <- a seq b.
E:\_workspaces\_workspace_01_internal_SVN_based\etalis\examples\sequence_01>swipl
-g "open('../results.txt',append,FH), ['../../src/etalis.P'],
set_etalis_flag(store_fired_events,on), compile_event_fi
le('test_01.event'), event(a), event(b),
findall(stored_event(event(c,T)),stored_event(event(c,T)),List), (
List = [stored_event(event(c,[datime(_,_,_,_,_,_,_),datime(_,_,_,_,_,_,_)]))]
-> write(FH,'s
equence_01\t\t\tpassed\n') ; write(FH,'sequence_01\t\t\tfailed\n') ),halt."
E:\_workspaces\_workspace_01_internal_SVN_based\etalis\examples\sequence_01>"c:\Program
Files\pl\bin\swipl" -g "open('../results.txt',append,FH),
['../../src/etalis.P'], set_etalis_flag(store_fired_ev
ents,on), compile_event_file('test_01.event'), event(a), event(b),
findall(stored_event(event(c,T)),stored_event(event(c,T)),List), (
List = [stored_event(event(c,[datime(_,_,_,_,_,_,_),datime(_,_,_,_
,_,_,_)]))] -> write(FH,'sequence_01\t\t\tpassed\n') ;
write(FH,'sequence_01\t\t\tfailed\n') ),halt."
% c:/documents and settings/pfodor/application data/swi-prolog/pl.ini
compiled 0.00 sec, 1,940 bytes
% binarizer.P compiled 0.00 sec, 10,768 bytes
% compiler.P compiled 0.05 sec, 73,336 bytes
% date_time.P compiled 0.02 sec, 19,536 bytes
% event_utils.P compiled 0.00 sec, 3,924 bytes
% executor.P compiled 0.02 sec, 14,500 bytes
% flags.P compiled 0.00 sec, 2,936 bytes
% garbage_collection.P compiled 0.00 sec, 4,132 bytes
% java_interface.P compiled 0.00 sec, 1,956 bytes
% justify_etalis.P compiled 0.00 sec, 21,504 bytes
% labeled_event_rules.P compiled 0.00 sec, 2,348 bytes
% logging.P compiled 0.02 sec, 2,380 bytes
% parser.P compiled 0.00 sec, 15,256 bytes
% storage.P compiled 0.00 sec, 14,888 bytes
% string.P compiled 0.00 sec, 6,292 bytes
% utils.P compiled 0.00 sec, 8,316 bytes
% ../../src/etalis.P compiled 0.09 sec, 222,636 bytes
*Event: a @ [datime(2010,10,5,12,6,43,1),datime(2010,10,5,12,6,43,1)]
*Event: b @ [datime(2010,10,5,12,6,43,2),datime(2010,10,5,12,6,43,2)]
*Event: temp_e_1(a,b) @
[datime(2010,10,5,12,6,43,1),datime(2010,10,5,12,6,43,2)]
*Event: c @ [datime(2010,10,5,12,6,43,1),datime(2010,10,5,12,6,43,2)]
Paul.