Loop Abstraction for Model Checking Memory

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional model checking techniques face challenges in verifying loops with non-deterministic or large bounds, leading to inefficiencies, memory errors, and assertion failures due to inadequate loop abstraction methods.

Innovation Solution

A method for loop abstraction in source code that involves generating an abstract loop with a bounded control statement and accelerated assignment of output variables, allowing for efficient model checking by replacing original loops with abstracted versions, thereby reducing memory and processing costs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional model checking techniques are used to verify loops with non-deterministic or large bounds, then verification completeness is improved, but memory consumption increases and assertion failures occur

Engineering Contradiction:
Improveverification completenessVSAvoidmemory consumption
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts the loop structure from the original program and creates a separate abstract loop model. This abstraction removes the problematic non-deterministic bounds while preserving the essential verification properties, allowing model checking to proceed with manageable memory requirements.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent transforms the loop bound parameter from non-deterministic or large values to a bounded abstract representation. By changing the parameter domain, the system enables verification without the memory exhaustion that occurs with conventional techniques on unbounded loops.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If loop unrolling is performed with small bounds in conventional model checking, then memory consumption is reduced, but assertion failures occur due to inadequate verification

Engineering Contradiction:
Improvememory consumptionVSAvoidverification accuracy
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent introduces an abstract loop as an intermediary between the original loop and the model checker. This intermediary preserves verification accuracy by maintaining the essential loop properties while using bounded representations that prevent assertion failures.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary abstraction of the loop structure before model checking. By pre-processing the loop into an abstract form that captures essential properties, the system ensures verification accuracy is maintained while avoiding the assertion failures that result from inadequate small-bound unrolling.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If abstract loop generation with accelerated assignment is implemented, then processing efficiency is improved, but abstraction complexity increases

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidabstraction complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the loop analysis into distinct components: identifying output variables, generating accelerated assignments, and constructing the abstract loop. This segmentation manages abstraction complexity by breaking down the complex task into manageable, systematic steps.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements self-service through automated detection of output variables and automatic generation of accelerated assignments. This automation reduces the manual effort required for abstraction while maintaining processing efficiency, managing the complexity burden through systematic automation rather than manual intervention.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP2913758B1Loop abstraction for model checking
Publication Date: 2018.02.07 TATA CONSULTANCY SERVICES LTD
  • EP2913758B1 patent drawingFigure 1
  • EP2913758B1 patent drawingFigure 2
  • EP2913758B1 patent drawing

AI summary

Loop abstraction includes determining an original loop within the source code. The original loop includes a control statement and a loop body such that the original loop causes the loop body to be repeatedly executed based on the control statement. Further, output variables in the original loop and a number of blocks associated with the original loop are identified. The number of blocks is indicative of a count of unconditionally executed statement sets in which at least one output variable is computed. An abstract loop corresponding to the original loop is generated by adding a modified expression for accelerated assignment for each output variable in a subset of the output variables, and replacing the control statement with a bounded control statement. The original loop is replaced with the abstract loop for generating an abstract source code for the model checking.