tcltk_debug_properties_or_op(TclOpName,ComputeUnsatCore,list(RealRes),Satisfiable) :-
adapt_tcl_operation_name(TclOpName,OpName),
print(tcltk_debug_properties_or_op(OpName,ComputeUnsatCore,RealRes)),nl,
(ComputeUnsatCore==false ->
(OpName='$setup_constants' -> b_debug_properties
; OpName = '@GOAL' -> b_debug_goal
; b_debug_operation(OpName))
; set_fast_unsat_core(ComputeUnsatCore),
print('*** Finding Unsat Core : '), print(ComputeUnsatCore),nl,
(b_find_unsat_core
-> print('*** Finished '),nl
; add_error_fail(predicate_debugger,'Finding Unsat Core failed',OpName))
),
print(debugged(OpName)),nl,
findall(TP, (checked_property(P),
translate_bexpression_with_limit(P,TrP),
ajoin([TrP,' &\n'],TP)),
Res1),
(projection_onto_component(_SubNr)
-> Res1P = ['(only a sub-component was analysed)\n'|Res1] ; Res1P=Res1),
(Res1=[] -> R1=Res1P ;
R1=['\n ********\n\nSATISFIABLE CONSTRAINTS and PROPERTIES:\n'|Res1P]
),
findall(TP2,( (failed_property(P,_),TRES='false' ; time_out_property(P,_),TRES='time_out'),
translate_status(P,TRES,TP2)),
Res2),
(Res2=[] -> R2=['\nNo unsatisfiable PROPERTY or CONSTRAINT'], Satisfiable=true
; R2=['\n ********\n\nFirst unsatisfiable PROPERTY or CONSTRAINT:\n'|Res2],
Satisfiable=false
),
findall(TP, (last_checked_solution(ConstantsState,_), % TO DO: Project on remaining variables !?
translate_equivalence(b(identifier('SOLUTION'),boolean,[]),ConstantsState,TP)),
Res12),
append(R2,['\n\n ********\n\nSolution for satisfiable part:\n'|Res12],R2Res12),
append(R1,R2Res12,Res),
findall(SetDescr,(b_global_set(Set),b_fd_card(Set,Card),
create_texpr(identifier(Set),set(global(Set)),[],SetId),
create_texpr(card(SetId),integer,[],CardExpr),
create_texpr(value(int(Card)),integer,[],ValExpr),
create_texpr(equal(CardExpr,ValExpr),prop,[],EqualExpr),
translate_bexpression(EqualExpr,SetDescr1),
(unfixed_deferred_set(Set) -> Xtra = ' (assumed for deferred set)' ; Xtra=''),
ajoin([SetDescr1,Xtra,'\n'],SetDescr)), Sets),
append(['\nCardinalities of SETS:\n'|Sets],Res,SRes),
preferences:get_preference(minint,MININT),
preferences:get_preference(maxint,MAXINT),
clear_error_context,
ajoin(['MININT .. MAXINT = ',MININT,'..',MAXINT],MINMAX),
RealRes = ['SETTINGS:\n',MINMAX|SRes].
tcltk_debug_properties_or_op([],_,list(['Machine has no PROPERTIES']),true).