Grace Operator for Implicit Parameter Reordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Implicit parameter order in programming languages is inflexible, limiting programmers' ability to declare parameters in a preferred order, as it depends on usage within the method body, leading to potential inefficiencies and code readability issues.

Innovation Solution

Introduction of the Grace˜ operator, which allows for prefix and postfix forms to correct the order of implicit parameters without altering the method body's algorithm, enabling standardized reordering of parameters within the method parameter list.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If implicit parameters are used in subroutine declaration, then code brevity is improved, but parameter order flexibility deteriorates

Engineering Contradiction:
Improvecode brevityVSAvoidparameter order flexibility
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent introduces an intermediary operator (Grace operator) that acts as a mediator between the implicit parameter declaration and the desired parameter order. This operator allows programmers to specify a different order for implicit parameters without changing the underlying implicit parameter mechanism, thus maintaining code brevity while achieving parameter order flexibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the parameter order by introducing a new operator that modifies the implicit parameter list. This operator allows reordering of implicit parameters in the declaration, enabling programmers to specify parameters in a different order than their natural occurrence in the method body, thereby resolving the contradiction between brevity and flexibility.

Inventive Principle:
Principle #35Parameter changes

2Device complexity

If implicit parameter order is determined by usage order in method body, then implementation simplicity is improved, but code readability deteriorates

Engineering Contradiction:
Improveimplementation simplicityVSAvoidcode readability
Core Design Contradiction:
Device complexityVSEase of operation

Solution Approach 1:

The patent applies preliminary action by allowing programmers to explicitly specify the desired parameter order in the declaration using the Grace operator, before the parameters are actually used in the method body. This preliminary specification makes the code more readable and easier to understand, while the implementation remains simple as the operator automatically handles the reordering.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If additional parameter order correction operators are introduced, then parameter reordering capability is improved, but language syntax complexity deteriorates

Engineering Contradiction:
Improveparameter reordering capabilityVSAvoidlanguage syntax complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent makes the Grace operator universal by designing it to handle multiple functions: it can reorder implicit parameters, handle different parameter types, and work with various declaration styles. This multi-functionality reduces the need for multiple separate operators or complex syntax constructs, thereby limiting the increase in language syntax complexity while achieving robust parameter reordering capability.

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

Data Source

PatentUS9417850B2Grace˜operator for changing order and scope of implicit parameters
Publication Date: 2016.08.16 LOGICS RES CENT SIA
  • US9417850B2 patent drawing
  • US9417850B2 patent drawing
  • US9417850B2 patent drawing

AI summary

Implicit parameters and implicit arguments are useful in many programming paradigms including functional and logic programming. Implicit parameter declaration order is inferred from the subroutine parameter usage order in the subroutine body. It means that implicit parameters have limited possibilities to be declared in the same order as programmers want. The parameter ignorance operator # allows changing implicit parameter order, but usage of this operator leads to subroutine declaration syntax similar to the syntax of declaring subroutine parameters explicitly, partially losing syntax benefits gained of implicit parameters. In order to preserve all the benefits of implicit parameter usage and allow programmers to change implicit parameter declaration order and scope in concise way, the Grace˜ operator, which is presented in this document, was invented.