Beispiel #1
0
                private SimpleArrayPropertiesAbstractDomain <BoxedVariable <Variable>, BoxedExpression> AdaptPartition(
                    BoxedVariable <Variable> array,
                    SimpleArrayPropertiesAbstractDomain <BoxedVariable <Variable>, BoxedExpression> dataContents,
                    IPartitionAbstraction <BoxedVariable <Variable>, BoxedExpression> fromPartition,
                    IPartitionAbstraction <BoxedVariable <Variable>, BoxedExpression> toPartition)
                {
                    // Assumption: fromPartition is not top
                    if (fromPartition.IsTop)
                    {
                        throw new AbstractInterpretationException();
                    }

                    var transformMap = fromPartition.TransformationMapFor(toPartition);

                    dataContents.TransformArray(array, transformMap);

                    return(dataContents);
                }
Beispiel #2
0
                private SimpleArrayPropertiesAbstractDomain <BoxedVariable <Variable>, BoxedExpression> Normalize(
                    BoxedVariable <Variable> array,
                    SimpleArrayPropertiesAbstractDomain <BoxedVariable <Variable>,
                                                         BoxedExpression> dataContents,
                    INumericalAbstractDomain <BoxedVariable <Variable>, BoxedExpression> dataIndexes,
                    IPartitionAbstraction <BoxedVariable <Variable>, BoxedExpression> partition)
                {
                    if (dataIndexes.IsBottom)
                    {
                        // TODO
                    }

                    var knowledge = dataIndexes.To <BoxedExpression>(new BoxedExpressionFactory <Local, Parameter, Method, Field, Property, Type, Attribute, Assembly>(this.DecoderForMetaData));

                    var emptyDimensions = partition.EmptyDimensionsInContext(knowledge);

                    dataContents.SimplifyArray(array, emptyDimensions);

                    return(dataContents);
                }