internal StringValueAnalysis(
     string methodName,
     IMethodDriver <APC, Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable, ILogOptions> methodDriver,
     IValueAnalysisOptions options)
     : base(methodName, methodDriver, options)
 {
 }
Example #2
0
 internal StringValueAnalysis(
     string methodName,
     IMethodDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, Expression, Variable, ILogOptions> methodDriver,
     IValueAnalysisOptions options,
     Predicate <APC> cachePCs
     )
     : base(methodName, methodDriver, options, cachePCs)
 {
 }
 public PolyhedraUnsafeAnalysis(
     string methodName,
     IMethodDriver <APC, Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable, ILogOptions> mdriver,
     IValueAnalysisOptions options,
     IOverallUnsafeStatistics overallStats
     )
     : base(methodName, mdriver, options, overallStats)
 {
 }
                public ContainersObligations(
                    IMethodDriver <APC, Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable, ILogOptions> mdriver,
                    IValueAnalysisOptions options
                    )
                {
                    //this.mdriver = mdriver;
                    //this.noObl = options.NoProofObligations;

                    //if (!this.noObl)
                    //{
                    //  this.Run(mdriver);
                    //}
                }
Example #5
0
            /// <summary>
            /// It runs the analysis.
            /// It is there because so we can use the typebinding, and make the code less verbose
            /// </summary>
            internal static IMethodResult <Variable> HelperForStringAnalysis
            (
                string methodName,
                IMethodDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, Expression, Variable, ILogOptions> driver,
                IValueAnalysisOptions options,
                Predicate <APC> cachePCs, DFAController controller
            )
            {
                var analysis = new StringValueAnalysis(methodName, driver, options, cachePCs);

                var closure = driver.HybridLayer.CreateForward(analysis, new DFAOptions {
                    Trace = false
                }, controller);

                closure(analysis.GetTopValue()); // Do the analysis

                return(analysis);
            }
            /// <summary>
            /// It runs the analysis.
            /// It is there because so we can use the typebinding, and make the code less verbose
            /// </summary>
            internal static IMethodResult <Variable> HelperForStringAnalysis(string methodName,
                                                                             IMethodDriver <APC, Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable, ILogOptions> driver, IValueAnalysisOptions options)
            {
                StringValueAnalysis analysis;

                analysis = new StringValueAnalysis(methodName, driver, options);

                // *** The next lines must be strictly sequential ***
                Action <SimpleStringAbstractDomain <BoxedExpression> > closure = driver.CreateForward <SimpleStringAbstractDomain <BoxedExpression> >(analysis);

                // At this point, CreateForward has called the Visitor, so the context has been created, so that now we can call initValue

                SimpleStringAbstractDomain <BoxedExpression> initValue = analysis.InitialValue;

                closure(initValue); // Do the analysis

                return(analysis);
            }
 public static IMethodResult <Variable> AnalyzeStrings <Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable>
     (string methodName,
     IMethodDriver <APC, Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable, ILogOptions> driver, IValueAnalysisOptions options)
     where Variable : IEquatable <Variable>
     where ExternalExpression : IEquatable <ExternalExpression>
     where Type : IEquatable <Type>
 {
     // We call the helper as a syntactic convenience, as there are too many type parameters!
     return(TypeBindings <Local, Parameter, Method, Field, Property, Type, Attribute, Assembly, ExternalExpression, Variable> .HelperForStringAnalysis(methodName, driver, options));
 }