public SlicerWorker(
            GeneralOptions options,
            ISimpleLineWriter outputLineWriter,
            ISlicerEnvironment <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> environment
            )
        {
            this.options         = options;
            this.environment     = environment;
            this.mdDecoder       = environment.MetaDataDecoder;
            this.contractDecoder = environment.ContractDecoder;
            this.fieldsDB        = new FieldsDB <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly>(this.mdDecoder);

            this.output = new TextWriterOutputWithPrefix(outputLineWriter.AsTextWriter(), options, "[SlicerWorker] "); // TODO

            var basicDriver = new BasicAnalysisDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, ILogOptions>(this.mdDecoder, this.contractDecoder, this.output, options);

            this.driver = new OldAnalysisDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, ILogOptions, IMethodResult <SymbolicValue> >(basicDriver);

            this.OptionsData = OptionsHashing.GetOptionsData(environment.MethodAnalyzers, environment.ClassAnalyzers, options);

            EGraphStats.IncrementalJoin = options.incrementalEgraphJoin; // used in OptimisticHeapAnalysis

            // TODO: initialize analysis needed by the slicer, but not more

            // TODO: is that it?
        }
Esempio n. 2
0
            public MDriver(
                Method method,
                OldAnalysisDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, LogOptions, MethodResult> parent,
                IClassDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, ExternalExpression <APC, SymbolicValue>, SymbolicValue, LogOptions, MethodResult> classDriver,
                bool removeInferredPrecondition
                )
                : base(method, parent)
            {
                specializedParent = parent;
                // Here we build our stack of adapters.
                //
                //  Expr          (expressions)
                //  Heap          (symbolic values)
                //  StackDepth    (Temp decoder for APC)
                //  CFG           (Unit decoder for APC, including Assume)
                //  cciilprovider (Unit decoder for PC)
                //
                // The base class already built the first 3
                // The last two are built on demand

                this.classDriver            = classDriver;
                RemoveInferredPreconditions = removeInferredPrecondition;
            }