コード例 #1
0
        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?
        }
コード例 #2
0
 public static ISlicerWorker <Method, Field, Type, Assembly> Worker <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly>(
     GeneralOptions options,
     ISimpleLineWriter output,
     ISlicerEnvironment <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> environment
     ) where Type : IEquatable <Type>
     where Method : IEquatable <Method>
 {
     return(new SlicerWorker <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly>(options, output, environment));
 }