Finite State Machine Code Generation for Memory Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing systems for modeling finite state machines face challenges in generating program code that efficiently queries active states while minimizing memory usage, particularly when considering hierarchical states and user-defined metrics such as power consumption and memory usage.
Innovation Solution
A user device determines the necessary variables to store information about active states based on the model's hierarchy and user-provided metrics, then generates program code using a numbering scheme to encode leaf states, reducing memory usage by selecting appropriate statement types like IF or SWITCH statements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If program code is generated to query active states in finite state machine models, then the ability to identify and query active states is improved, but memory usage increases
Solution Approach 1:
The patent segments the finite state machine model into hierarchical levels, where each level represents a subset of states. The program code queries active states by examining each hierarchical level separately rather than all states at once. This segmentation allows the system to identify active states with high precision while using less memory by processing state information in divided portions corresponding to different hierarchical levels.
2Measurement precision
If detailed state information is stored to enable precise querying, then measurement precision improves, but device complexity increases
Solution Approach 1:
The patent introduces a hierarchical dimension to organize states, where states are arranged in multiple levels rather than a flat structure. Each hierarchical level contains a subset of states, and the program code navigates this hierarchical dimension to query active states. This dimensional organization enables precise state identification through level-by-level examination while managing complexity by structuring the model in a systematic hierarchical framework.
Data Source
AI summary
A device may receive information that identifies a model of a finite state machine. The model may include information that identifies a group of leaf states. The group of leaf states may include states of the model with no child states. The device may determine, based on the information that identifies the model, a set of variables required to store information that identifies an active state of the model. The device may determine a numbering scheme for encoding the group of leaf states. The numbering scheme may be based on the set of variables. The device may encode the group of leaf states based on the numbering scheme. Encoding the group of leaf states may include generating and storing information indicating an association between a leaf state and a value.


