Lexicographical Scoping for C-Functions in Stateflow Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

C-functions embedded in graphical models cannot reference entities within the model without explicit passing, leading to inefficiencies in modeling and potential errors due to scope limitations.

Innovation Solution

Implementing lexicographical scoping that combines concurrent lexical and graphical scoping to facilitate name binding of identifiers in C-functions to entities within the graphical model, allowing accurate and efficient modeling without excess code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If C-functions are embedded in graphical models without explicit passing, then modeling efficiency is improved, but scope limitations cause errors and reduce reliability

Engineering Contradiction:
Improvemodeling efficiencyVSAvoidreference accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent extends the traditional single-dimensional lexical scope to a two-dimensional scoping system that combines lexical scope (text-based) with graphical scope (visual model-based). This allows C-function identifiers to reference entities through either lexical paths or graphical paths, resolving the contradiction by adding a new dimension of reference capability that maintains both efficiency and reliability

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If explicit passing is required for all entities, then scope limitations are avoided, but excess code is required reducing modeling efficiency

Engineering Contradiction:
Improvereference accuracyVSAvoidmodeling efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates a universal scoping system where identifiers can serve multiple functions: they can reference entities through lexical scope when available, through graphical scope when lexical scope is insufficient, and support both automatic resolution and explicit passing modes. This multi-functionality eliminates the need for excess code while maintaining reference accuracy

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Device complexity

If lexical scope only is used, then implementation is simple, but entities outside lexical scope cannot be referenced

Engineering Contradiction:
Improvescoping system complexityVSAvoidentity reference capability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent segments the scoping system into distinct components: lexical scope resolution, graphical scope resolution, and their integration layer. Each component handles specific aspects of entity reference, with the lexical scope handling simple cases and the graphical scope handling complex cases, allowing the system to maintain simplicity where possible while extending capability where needed

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9256406B1Graphically scoped C-functions inside stateflow
Publication Date: 2016.02.09 MATHWORKS INC
  • US9256406B1 patent drawing
  • US9256406B1 patent drawing
  • US9256406B1 patent drawing

AI summary

A device may select a program code function associated with a graphical model. The program code function may include a set of identifiers. The device may select an identifier from the set of identifiers. The device may determine a particular set of entities that are referenceable at a program code location of the identifier. The particular set of entities may include a first set of entities of the program code function for which the identifier is within a lexical scope of the first set of entities and a second set of entities of the graphical model for which the program code function is within the graphical scope of the second set of entities. The device may determine whether the identifier corresponds to a particular entity of the particular set of entities. The device may provide information associated with determining whether the identifier corresponds to the particular entity.