Integrating Declarative Rules with Procedural Code via Hash Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing digital data processing systems face complexity and bugs due to their procedural-based programming paradigm, which requires detailed sequencing and state management, whereas declarative rule-based systems are limited in their ability to handle sequential activities.

Innovation Solution

Integration of declarative and procedural programming systems, where procedural instructions are executed while maintaining consistency with declarative rules through immediate propagation of changes, using hash tables and change tracking to ensure data consistency without explicit updates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If procedural-based programming paradigm is used, then sequential activities and detailed control can be specified, but system complexity and number of bugs increase exponentially

Engineering Contradiction:
Improvecontrol capabilityVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The system is segmented into two distinct programming paradigms: procedural programming for sequential control and declarative rule-based programming for invariant relationships. Each paradigm handles specific aspects of the problem independently, preventing the exponential complexity growth that would occur if all control logic were procedural.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent merges procedural and declarative programming systems into a unified framework where both can coexist. Procedural code executes sequential operations while declarative rules maintain invariant relationships, and the two systems interact through a integration mechanism that propagates changes bidirectionally.

Inventive Principle:
Principle #5Merging (Combining)

2Ease of operation

If declarative rule-based system is used, then programmer focus on invariant relations is improved, but ability to handle sequential activities is limited

Engineering Contradiction:
Improveprogrammer focusVSAvoidsequential activity handling
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The system combines declarative rule-based programming with procedural programming to allow programmers to specify invariant relations using declarative rules while handling sequential activities through procedural statements. Both paradigms operate within the same system and can interact through the integration mechanism.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The problem space is segmented into aspects that are best handled declaratively (invariant relationships) and aspects that are best handled procedurally (sequential activities). This segmentation allows each paradigm to be used where it is most effective.

Inventive Principle:
Principle #1Segmentation

3Reliability

If procedural instructions modify variables in declarative system, then data consistency must be maintained, but explicit update propagation increases complexity

Engineering Contradiction:
Improvedata consistencyVSAvoidupdate propagation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The integration mechanism implements feedback by monitoring variable modifications in the procedural system and automatically propagating these changes to the declarative rule-based system. When a procedural instruction modifies a variable that participates in declarative rules, the system detects this change and triggers automatic propagation to maintain consistency.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system uses hash tables indexed by variable names to automatically track which variables participate in declarative rules. This self-service mechanism eliminates the need for manual tracking and propagation logic, reducing the complexity of maintaining data consistency.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7665063B1Integration of declarative rule-based processing with procedural programming
Publication Date: 2010.02.16 PEGASYSTEMS INC
  • US7665063B1 patent drawing
  • US7665063B1 patent drawing
  • US7665063B1 patent drawing

AI summary

The present invention provides methods and systems for integrating a procedural computational model with a declarative computational model. For example, in one aspect, the present invention provides a method for integrating a plurality of procedural instructions in a procedural computational system with a plurality of declarative rules in a declarative computational system. In such a method, for each of the procedural instructions operating on one or more variables, a hash table indexed by variable names is utilized to determine whether any of these variables participate in at least one of the declarative rules. Upon execution of a procedural instruction that changes a variable participating in a declarative rule, other variables associated with the rule are updated so as to maintain a relationship imposed by the rule among the variables. The updating of the other variables is performed prior to execution of other procedural instructions.