Beispiel #1
0
        public IReadOnlyCollection <Transition> AnalyzeTransitions(State source, Action action, IEnumerable <State> targets)
        {
            ISolver corralRunner        = new CorralRunner(defaultArgs, workingDir);
            var     transitionQueries   = queryGenerator.CreateTransitionQueries(source, action, targets);
            var     queryAssembly       = CreateBoogieQueryAssembly(transitionQueries);
            var     evaluator           = new QueryEvaluator(corralRunner, queryAssembly);
            var     feasibleTransitions = evaluator.GetFeasibleTransitions(transitionQueries);

            unprovenQueriesCount += evaluator.UnprovenQueries;

            return(feasibleTransitions);
        }
Beispiel #2
0
        public ActionAnalysisResults AnalyzeActions(State source, Action action, IEnumerable <Action> actions)
        {
            ISolver corralRunner = new CorralRunner(defaultArgs, workingDir);

            if (action.IsPure)
            {
                return(new ActionAnalysisResults(new HashSet <Action>(source.EnabledActions), new HashSet <Action>(source.DisabledActions)));
            }

            var enabledActions  = GetMustBeEnabledActions(source, action, actions, corralRunner);
            var disabledActions = GetMustBeDisabledActions(source, action, actions, corralRunner);

            Contract.Assert(!enabledActions.Intersect(disabledActions).Any());

            return(new ActionAnalysisResults(enabledActions, disabledActions));
        }