Example #1
0
		/// <summary>
		///   Initializes a new instance.
		/// </summary>
		/// <param name="stateGraph">The state graph that should be analyzed.</param>
		/// <param name="successorStateCapacity">The maximum number of successor states supported per state.</param>
		public StateGraphModel(StateGraph stateGraph, long successorStateCapacity)
		{
			Requires.NotNull(stateGraph, nameof(stateGraph));

			_stateGraph = stateGraph;
			_transitions = new TransitionSetBuilder(StateVectorSize, successorStateCapacity);
		}
		/// <summary>
		///   Initializes a new instance.
		/// </summary>
		/// <param name="createModel">Creates the model that should be checked.</param>
		/// <param name="stateFormulas">The state formulas that can be evaluated over the generated state graph.</param>
		/// <param name="output">The callback that should be used to output messages.</param>
		/// <param name="configuration">The analysis configuration that should be used.</param>
		internal StateGraphGenerator(Func<AnalysisModel> createModel, Formula[] stateFormulas,
									 Action<string> output, AnalysisConfiguration configuration)
			: base(createModel, output, configuration)
		{
			var analyzedModel = AnalyzedModels.First();

			_stateGraph = new StateGraph(
				Context, stateFormulas, analyzedModel.TransitionSize,
				analyzedModel.RuntimeModel, analyzedModel.RuntimeModelCreator);

			Context.TraversalParameters.BatchedTransitionActions.Add(() => new StateGraphBuilder(_stateGraph));
		}