print_seq_chart_transition(Stream,transition_from(CurStateID,Term)) :-
specfile:get_operation_name(Term,OpName),
b_definition_prefixed(expression,'SEQUENCE_CHART_',OpName,DefName,_Pos),
debug_println(19,found_def(DefName)),
get_operation_arguments(Term,OpArgs),
b_get_definition(DefName,expression,DefArgs,RawSubst,_Deps),
arg(1,RawSubst,Pos),
length(DefArgs,DefNrArgs),
maplist(gen_raw_arg(Pos),OpArgs,RawArgs),
(prefix_length(RawArgs,DefRawArgs,DefNrArgs)
-> true % we allow the DEFINITION to take fewer arguments; possibly useful when ANY variables lifted to args
; add_warning(write_uml_sequence_chart,'DEFINITION has too many arguments: ',DefName/DefNrArgs,Pos),
fail
),
extend_typing_scope_for_stored_lets([prob_ids(visible),variables],Scope),
%add_message(seq_chart,'Typing DEFINITION for UML Sequence Chart: ',DefName,Pos),
type_with_errors(definition(Pos,DefName,DefRawArgs),Scope,_Type,TypedExpr),
visited_expression(CurStateID,State),
(state_corresponds_to_set_up_constants(State,BState) -> true
; BState=[]
),
tcltk_interface:b_compute_expression_with_prob_ids(TypedExpr,BState,Value),
process_uml_bvalue(Value,Term,Pos,Stream),
!.
print_seq_chart_transition(Stream,transition_from(_,Term)) :-
specfile:get_operation_name(Term,OpName),
specfile:get_operation_arguments(Term,OpArgs), length(OpArgs,Len),
translate_event_with_limit(Term,100,TS),
format('No SEQUENCE_CHART_~w/~w DEFINITION found for transition ~w~n',[OpName,Len,TS]),
format(Stream,'main --> main: ~w~n',[TS]).