1function [stateSpace,stateSpaceAggr,stateSpaceHashed,nodeStateSpace,sn] = ctmc_ssg_reachability(sn,options)
3[stateSpace,stateSpaceHashed,qnc] = State.reachableSpaceGenerator(sn,options);
4nodeStateSpace = qnc.space;
5sn.space = nodeStateSpace;
8% line_printf(
'\nCTMC state space size: %d states. ',size(stateSpace,1));
10if ~isfield(options.config,
'hide_immediate')
11 options.config.hide_immediate = true;
14nstateful = sn.nstateful;
15nclasses = sn.nclasses;
18stateSpaceAggr = zeros(size(stateSpaceHashed));
20% for all synchronizations
22 stateCell = cell(nstateful,1);
23 for s=1:size(stateSpaceHashed,1)
24 state = stateSpaceHashed(s,:);
25 % update state cell array and SSq
28 isf = sn.nodeToStateful(ind);
29 stateCell{isf} = sn.space{isf}(state(isf),:);
31 ist = sn.nodeToStation(ind);
32 [~,nir] = State.toMarginal(sn,ind,stateCell{isf});
34 stateSpaceAggr(s,((ist-1)*nclasses+1):ist*nclasses) = nir;