Code Verification via Model Slicing and Connectivity Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The verification of computer-executable code generated from models is challenging due to the complexity of models and the need for both automated and manual verification, especially in safety-critical systems, where existing methods are costly and time-consuming, and often require partial verification.

Innovation Solution

A code verifier is used to automatically verify the generated code by creating element connectivity lists and program dependency graphs, comparing model and code components, and providing partial verification reports, while also supporting manual review and optimization considerations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If automated verification methods are used to verify generated code, then verification efficiency is improved, but verification completeness deteriorates (partial verification only)

Engineering Contradiction:
Improveverification efficiencyVSAvoidverification completeness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The verification process is divided into two distinct segments: an automated verification phase that handles routine code comparisons efficiently, and a manual review phase that addresses complex verification scenarios. This segmentation allows each phase to operate at its optimal capability level, with automated tools handling high-volume simple checks and human experts focusing on nuanced cases.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A hybrid verification system acts as an intermediary between fully automated verification and complete manual review. This intermediate system combines automated code comparison tools with structured manual review processes, enabling the transition from partial automated verification to more comprehensive verification while maintaining efficiency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If manual verification is performed to ensure complete code correctness, then verification accuracy is improved, but time consumption increases

Engineering Contradiction:
Improveverification accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

Instead of performing complete manual verification on all generated code, the system applies partial manual review only to specific portions of code that require human judgment. Automated tools handle the majority of verification tasks, while manual review is strategically applied to complex or critical sections, reducing overall time consumption while maintaining necessary accuracy.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The automated verification system performs self-service by automatically identifying and flagging code sections that require manual review, eliminating the need for manual inspection of all code. This self-identification process allows the system to autonomously determine verification priorities and route only necessary cases to human reviewers.

Inventive Principle:
Principle #25Self-service

3Reliability

If comprehensive verification of all code components is performed, then code correctness is improved, but complexity of verification process increases

Engineering Contradiction:
Improvecode correctnessVSAvoidverification process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Different verification depths and methods are applied to different code components based on their specific characteristics and risk profiles. Critical code sections receive more rigorous verification, while less critical sections undergo streamlined verification processes. This localized approach ensures comprehensive correctness verification without uniformly increasing process complexity across all code.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The verification process is segmented into multiple stages with increasing depth of analysis. Initial automated checks filter out obvious errors, followed by targeted manual review of specific components, and finally comprehensive verification only for critical paths. This segmentation manages verification complexity by breaking down the overwhelming task of complete code verification into manageable, staged processes.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8869103B2Using intermediate representations to verify computer-executable code generated from a model
Publication Date: 2014.10.21 MATHWORKS INC
  • US8869103B2 patent drawing
  • US8869103B2 patent drawing
  • US8869103B2 patent drawing

AI summary

In an embodiment, a model is sliced into a plurality of slices. A slice in the plurality of slices is selected. A portion of code, that corresponds to the selected slice, is identified from code generated from the model. The identified code is verified to be equivalent to the selected slice. Equivalence may include equivalent functionality, equivalent data types, equivalent performance, and/or other forms of equivalence between the selected slice and the identified generated code.