Dynamic Function Argument Completion in IDEs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Using function signatures in computer programming can be difficult, time-consuming, and error-prone, as users need to have a deep understanding of and remember the function signature details, including argument types, orders, and constraints, which can lead to errors and inefficiencies.

Innovation Solution

A technical computing environment dynamically completes function signatures by providing selectable valid values for function arguments based on user input, using a state machine and querying the operating system or other resources to determine valid values, reducing the need for users to manually input all signature information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If users manually input function signature information including argument types, orders, and constraints, then programming flexibility and control are improved, but programming time and error rate increase

Engineering Contradiction:
Improveease of function invocationVSAvoidprogramming time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The system enables self-service by automatically generating function signatures and validating arguments without requiring manual user input. The programming environment introspects available functions and their constraints, then autonomously completes the signature information, reducing both programming time and errors while maintaining full control over the function invocation process.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary action by pre-computing and caching function signature information, argument constraints, and valid argument sets before user invocation. This advance preparation allows the system to quickly present accurate signature completions and validate arguments in real-time, eliminating the need for users to manually research or remember signature details.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If users manually input function signature information, then accuracy of function invocation can be improved through user review, but error rate increases due to user mistakes and deep understanding requirements

Engineering Contradiction:
Improveaccuracy of function invocationVSAvoiduser errors
Core Design Contradiction:
ReliabilityVSObject-generated harmful factors

Solution Approach 1:

The system implements feedback by continuously monitoring user input against pre-computed argument constraints and valid argument sets. As users type or select arguments, the system provides real-time validation feedback, highlighting invalid choices and suggesting correct alternatives. This automated feedback loop prevents errors before execution, ensuring high reliability without burdening users with complex validation rules.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system applies beforehand cushioning by pre-validating all argument combinations against function constraints before user submission. Invalid argument sets are filtered and blocked in advance, with the system cushioning users from making erroneous invocations by only presenting valid options. This preventive approach eliminates errors at the source rather than correcting them afterward.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

3Reliability

If complete function signature information is required for every function call, then function invocation accuracy is improved, but computing resources are wasted on redundant information processing

Engineering Contradiction:
Improvefunction invocation accuracyVSAvoidprocessing power and memory
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system segments function signature information into hierarchical levels: mandatory arguments, optional arguments with defaults, and context-dependent arguments. Users and the system only need to process the relevant segment for each specific function call rather than the complete signature for all functions. This segmentation reduces memory usage and processing overhead while maintaining invocation accuracy for the active function.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system dynamically changes parameters by adapting the level of signature detail presented based on context. For frequently called functions with simple signatures, the system compresses information display. For complex or less familiar functions, it expands details on demand. Argument validation thresholds and checking depth are also adjusted based on function criticality and user expertise level, optimizing the balance between accuracy and resource consumption.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10691420B1Dynamic function argument completion
Publication Date: 2020.06.23 MATHWORKS INC
  • US10691420B1 patent drawing
  • US10691420B1 patent drawing
  • US10691420B1 patent drawing

AI summary

A device may receive code and may identify a function included in the code. The device may identify for display and user selection a first argument value, corresponding to a first argument of the function, included in the code. The device may determine one or more valid values for a second argument associated with the function based on the function and the first argument value. The device may provide the one or more valid values for the second argument for display.