UIFunction

1. Introduction

    UIFunction is a functional programming method that uses dynamic models. The purpose is to achieve automatic programming. Although automatic programming has not yet been implemented, it is a project worth exploring.

2. Design thinking

  • Based on goals and choices
    In reality, when we want to go somewhere, we will choose the route and mode of transportation. After the selection is completed, it is the execution process.
      
  • Functional programming approach
    Think of the goals and implementation methods as separate functions, and the selected results as the parameters of the function. When the parameters of a function are determined, it can be executed.
    For example, going to a certain place is a function. This function has parameters such as place, route, and transportation method. To execute it, first select the appropriate function as its parameter. If the parameter function also has parameters, also select the function corresponding to the parameter. When all the parameters of the function are set, it can be executed.
     
  • Interactive programming
    The process of selecting a parameter function can be interactive, and some leaf functions can also be input through the interface, such as entering a place to go.

3.Features

  • Parallel execution
    UIFunction can be executed in parallel. For example, a function has two parameters, and the function of the parameters also has parameters, so the entire function is a tree. Since branches are not directly related to each other, they can be executed in parallel and merged when execution converges to the same parent node.
      
  • Automatic programming
    The purpose of UIFunction is to realize automatic programming. The principle is that if the function of selecting parameters can also be automatic. However, this goal has not yet been achieved.    

4.Example

    The video of about one minute below demonstrates starting a function interaction model, setting up a mathematical addition function, and setting the functions of parameters x and y as digital inputs. After the function is set up, it can be run.

 

 

 

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号