Method and device for constructing combined function block, and storage medium
By nesting and using the combination paradigm to construct combination function blocks, the problems of incomplete modularization and abstraction in high-level languages are solved, the complete modularization of the software structure and the high degree of abstraction of the algorithm are achieved, and visual operations and standardized specifications are supported.
Patent Information
- Application Number
- CN202111142660.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-09-28
AI Technical Summary
Existing high-level languages fail to fully realize modularization and abstraction in software design, making the software structure difficult to design, understand, and maintain, and algorithms cannot be shared between different software.
Construct combined function blocks by nesting combination paradigms, select multiple combination paradigms, obtain the arrangement operation of function blocks, perform splicing operations to determine the connection relationship between function blocks, generate the interface of combined function blocks, and implement data between function blocks The items are connected to form high-level function blocks.
It achieves 100% modularization of the software structure, simplifies software design, achieves a high degree of abstraction and portability of algorithms, breaks code barriers between different industries, and supports visual operations and standardized specifications.
Smart Images

Figure CN113867696B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to a method for constructing a combinatorial function block by nesting a combinatorial paradigm, an apparatus for constructing a combinatorial function block, a combinatorial function block, and a non-transitory computer-readable storage medium. Background Art
[0002] There are two fundamental design principles in software design: modularity and abstraction. Modularity makes software easier to design, understand, and maintain. Abstraction makes code more reusable. There's no single approach to implementing modularity or abstraction in software design; the choice depends on the application. Summary of the Invention
[0003] At least one embodiment of the present disclosure provides a method for constructing a combinational function block by nesting combinational paradigms, which is applied to a function block library, wherein the function block library includes multiple function blocks, wherein the method includes: selecting at least one combinational paradigm from multiple combinational paradigms; obtaining an arrangement operation on at least two function blocks in the multiple function blocks to obtain a calculation sequence; performing a splicing operation based on the calculation sequence to determine the connection relationship between the at least two function blocks; based on the interface of each function block in the at least two function blocks and the connection relationship between the at least two function blocks, encapsulating the at least two function blocks into a combinational function block, and generating an interface corresponding to the combinational function block; wherein each function block in the multiple function blocks includes at least one input data item and at least one output data item corresponding to the interface corresponding to the function block, and the at least one input data item and the at least one output data item exist in the function block in a stored form, and the splicing operation includes connecting at least part of the input data items and / or at least part of the output data items of the at least two function blocks.
[0004] At least one embodiment of the present disclosure provides a combined function block obtained according to the method described in any embodiment of the present disclosure, wherein the combined function block includes: one or more function blocks, wherein the one or more function blocks are connected via data transfer lines and / or auxiliary merging lines.
[0005] At least one embodiment of the present disclosure provides a device for constructing a combinational function block, comprising: a memory for non-transiently storing computer-readable instructions; a processor for executing the computer-readable instructions, wherein the computer-readable instructions implement the method according to any embodiment of the present disclosure when executed by the processor.
[0006] At least one embodiment of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method according to any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, rather than limiting the present disclosure.
[0008] Figure 1 A schematic diagram of a method for constructing a combined function block provided in some embodiments of the present disclosure;
[0009] Figure 2A A schematic diagram of a graphical representation of two calculations provided in some embodiments of the present disclosure;
[0010] Figure 2B For Figure 2A Schematic diagram of combining the two calculations shown;
[0011] Figure 2C For Figure 2A A schematic diagram of a graphical representation of a new calculation obtained by combining the two calculations shown;
[0012] Figure 2D For Figure 2A A schematic diagram of a graphical representation of an interface for a new calculation obtained by combining the two calculations shown;
[0013] Figure 3A A schematic diagram of a graphical representation of a data item provided in some embodiments of the present disclosure;
[0014] Figure 3B A schematic diagram of a graphical representation of an integer data item provided in some embodiments of the present disclosure;
[0015] Figures 3(1)A to 3(1)F A storage hierarchy diagram of an interface of a function block provided in some embodiments of the present disclosure;
[0016] Figure 4A A schematic diagram of a graphical representation of an interface of a basic function block provided in some embodiments of the present disclosure;
[0017] Figure 4B A storage hierarchy diagram of an interface of a basic function block provided in some embodiments of the present disclosure;
[0018] Figure 4C A schematic diagram of a graphical representation of an interface of an addition function block provided in some embodiments of the present disclosure;
[0019] FIG4D(1) is a storage hierarchy structure diagram of an interface of an addition function block provided in some embodiments of the present disclosure;
[0020] FIG4D(2) is another storage hierarchy structure diagram of an interface of an addition function block provided in some embodiments of the present disclosure;
[0021] Figure 4E A schematic diagram of a graphical expression of a basic function block of a relational expression provided in some embodiments of the present disclosure;
[0022] Figure 4F A schematic diagram of a graphical expression form of a specific example of a basic function block representing a relational expression provided in some embodiments of the present disclosure;
[0023] Figure 4G A storage hierarchical structure diagram of an interface representing a basic function block of a relational expression provided in some embodiments of the present disclosure;
[0024] Figure 4H A schematic diagram of a graphical expression of a basic function block of a logic expression provided in some embodiments of the present disclosure;
[0025] Figure 4I A schematic diagram of a graphical expression form of a specific example of a basic function block of logic and expression provided in some embodiments of the present disclosure;
[0026] Figure 4J A storage hierarchical structure diagram of an interface representing a basic function block of logic and expression provided in some embodiments of the present disclosure;
[0027] Figure 4K A schematic diagram of a graphical representation of a basic function block of an arithmetic expression provided in some embodiments of the present disclosure;
[0028] Figure 4L A schematic diagram of a graphical representation of a basic function block of an addition expression provided in some embodiments of the present disclosure;
[0029] Figure 4M A storage hierarchical structure diagram of an interface for a basic function block representing an addition expression provided in some embodiments of the present disclosure;
[0030] Figure 4N Another storage hierarchy diagram of an interface for a basic function block representing an addition expression provided in some embodiments of the present disclosure;
[0031] Figure 4O A schematic diagram of a graphical representation of a basic function block of an assignment expression provided in some embodiments of the present disclosure;
[0032] Figure 4PA schematic diagram of a graphical expression form of a specific example of a basic function block of an assignment expression provided in some embodiments of the present disclosure;
[0033] Figure 4Q A storage hierarchy diagram of an interface for a basic function block representing an assignment expression provided in some embodiments of the present disclosure;
[0034] Figure 4R A schematic diagram of a graphical representation of a basic function block of a getname function provided for some embodiments of the present disclosure;
[0035] Figure 4S A storage hierarchical structure diagram of an interface representing a basic function block of a getname function provided in some embodiments of the present disclosure;
[0036] Figure 5A A schematic diagram of an input-output transfer line provided in one embodiment of the present disclosure;
[0037] Figure 5B A schematic diagram of an input / output transmission line provided in one embodiment of the present disclosure;
[0038] Figure 5C A schematic diagram of another input / output transmission line provided in one embodiment of the present disclosure;
[0039] Figure 5D A schematic diagram of another input / output transmission line provided in one embodiment of the present disclosure;
[0040] Figure 5E A schematic diagram of an auxiliary merging connection provided by an embodiment of the present disclosure;
[0041] Figure 6 A schematic diagram of a combined function block provided in some embodiments of the present disclosure;
[0042] Figure 7A A schematic diagram of a method for combining function blocks based on a sequential combination paradigm provided in some embodiments of the present disclosure;
[0043] Figure 7B A schematic diagram of a graphical representation of at least two function blocks provided in some embodiments of the present disclosure;
[0044] Figure 7C A schematic diagram of a graphical expression of a constant data item provided in some embodiments of the present disclosure;
[0045] Figure 7D A schematic diagram of a graphical representation of two function blocks provided in some embodiments of the present disclosure;
[0046] Figure 8AA schematic diagram of a graphical expression of a calculation sequence provided in some embodiments of the present disclosure;
[0047] Figure 8B for Figure 8A A schematic diagram of a graphical representation of a constant data item is shown;
[0048] Figure 8C For Figure 8A A schematic diagram of a graphical representation of the calculation sequence shown after connecting lines;
[0049] Figure 8D Based on Figure 8C A schematic diagram of a graphical expression of an interface corresponding to a combinational function block determined by the wiring relationship shown;
[0050] Figure 8E for Figure 8D The storage hierarchy diagram of the interface shown;
[0051] Figure 9A A schematic diagram of a combined function block of an if structure provided in some embodiments of the present disclosure;
[0052] Figure 9B A schematic diagram of a method for combining function blocks based on the if combination paradigm provided in some embodiments of the present disclosure;
[0053] Figure 9C A schematic diagram of a graphical expression of a combined function block of an if structure provided in some embodiments of the present disclosure;
[0054] Figure 9D For Figure 9C A schematic diagram of a graphical representation of data items in the combined function block shown in FIG.
[0055] Figure 9E A schematic diagram of a combined function block of a conditional structure provided in some embodiments of the present disclosure;
[0056] Figure 9F for Figure 9E A schematic diagram of a graphical representation of an interface corresponding to a combination function block of an if structure is shown;
[0057] Figure 10A A schematic diagram of a combined function block of a for structure provided in some embodiments of the present disclosure;
[0058] Figure 10B A schematic diagram of a method for combining function blocks based on the for combination paradigm provided in some embodiments of the present disclosure;
[0059] Figure 10CA schematic diagram of a graphical expression of a combined function block of a for structure provided in some embodiments of the present disclosure;
[0060] Figure 10D For Figure 10C A schematic diagram of a graphical representation of the calculation sequence shown after connecting lines;
[0061] Figure 10E For Figure 10C A schematic diagram of another graphical expression of the calculation sequence shown after connecting lines;
[0062] Figure 10F For Figure 10C A schematic diagram of another graphical expression of the calculation sequence shown in FIG.
[0063] Figure 10G for Figure 10F A schematic diagram of a graphical representation of an interface corresponding to a combination function block of a for structure shown;
[0064] Figure 10H A storage hierarchy diagram showing an interface of a function block including array type data items;
[0065] Figure 10I The diagram shows the storage hierarchy structure when the first level of array type data items is expanded;
[0066] Figure 10J The diagram shows the storage hierarchy structure when the second level expansion is performed on the array type data item;
[0067] Figure 11A A schematic diagram of a calculation function provided in some embodiments of the present disclosure;
[0068] Figure 11B A schematic diagram of a graphical expression of another for-structured combined function block provided in some embodiments of the present disclosure;
[0069] Figure 11C Another schematic diagram of a calculation function provided in some embodiments of the present disclosure;
[0070] Figure 11D For Figure 11B A schematic diagram of a graphical representation of the calculation sequence shown after connecting lines;
[0071] Figure 11E For Figure 11C A schematic diagram of another graphical expression of the calculation sequence shown after connecting lines;
[0072] Figure 11F for Figure 11E A schematic diagram of a graphical representation of an interface corresponding to a combination function block of a for structure shown;
[0073] Figure 12A A schematic diagram of a combined function block of a while structure provided in some embodiments of the present disclosure;
[0074] Figure 12B A schematic diagram of a method for combining function blocks based on the while combination paradigm provided in some embodiments of the present disclosure;
[0075] Figure 13 A device for constructing a combined function block provided in some embodiments of the present disclosure;
[0076] Figure 14 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure;
[0077] Figure 15A A schematic diagram of a plurality of function blocks for combination provided in some embodiments of the present disclosure;
[0078] Figure 15B For Figure 15A Schematic diagram of connecting multiple function blocks shown;
[0079] Figure 15C Based on Figure 15A A schematic diagram of an interface of a large function block generated by combining multiple function blocks shown;
[0080] Figure 15D Based on Figure 15A The diagram shows a large function block generated by combining multiple function blocks. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0082] Unless otherwise defined, the technical or scientific terms used in this disclosure should have the usual meanings understood by persons of ordinary skill in the field to which this disclosure belongs. The words "first", "second" and similar terms used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "include" or "comprise" mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0083] In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits detailed descriptions of some known functions and components.
[0084] An algorithm is a combinatorial system, consisting of a finite number of basic structural units and a finite number of combination rules that form an algorithmic closure. Any algorithm can be evolved through the repeated use of basic structural units and a finite number of combination rules. Modular software design methods can improve software development and maintenance efficiency. On the one hand, software structures are not yet 100% modular, and a large amount of non-modular statement-level development behavior still exists. On the other hand, existing software design applications and algorithms are not separated. As a result, although the algorithms used by different software are essentially the same, they cannot be shared due to different variable names used in the algorithms.
[0085] Statements in high-level languages are all contained within a function structure, which consists of a data area and a calculation area. The data area includes the function's input parameters, variables used by statements defined within the function (including output variables and intermediate variables), and external variables used by the function. The calculation area is composed of statements. Statement types include: compound statements (statements can contain statements such as if, for, and while), function (call) statements, and basic statements (implementing addition (+), subtraction (-), multiplication (*), division ( / ), assignment, logical calculations, etc.). In other words, in addition to variable definition statements, compound statements, and function statements, other statements that implement language-defined calculations).
[0086] Considering a basic statement in a high-level language as a computational unit, a computational unit includes two parts: input and output. A high-level language uses statements to organize a small computational unit into a large one. When organizing functions in a high-level language, it is necessary to first determine the data area and name each storage in the data area (i.e., define a variable name). Statements represent the computation of the data in the data area by referencing the variable name of the data area. Therefore, a high-level language organizes computations by describing the relationship between each statement and the storage in the data area, rather than by describing the interactive relationship between each statement. There is no direct relationship between each statement. In other words, the software modularization mentioned in the prior art is actually to encapsulate multiple statements that implement a certain function into a software module, that is, to organize a large computation by first defining the data and then expressing the relationship between small computations and data. This is not a modular organization method in essence. The main reason why modularization cannot be fully realized is the implementation method of the function structure containing statements and data areas in the high-level language.
[0087] At least one embodiment of the present disclosure provides a method for constructing a combinatorial function block by nesting combinatorial paradigms, an apparatus for constructing a combinatorial function block, a combinatorial function block, and a non-transitory computer-readable storage medium. The method for constructing a combinatorial function block by nesting combinatorial paradigms is applied to a function block library, the function block library including multiple function blocks. The method comprises: selecting at least one combinatorial paradigm from multiple combinatorial paradigms; obtaining a permutation operation on at least two function blocks from the multiple function blocks to obtain a calculation sequence; performing a splicing operation based on the calculation sequence to determine a connection relationship between the at least two function blocks; and encapsulating the at least two function blocks into a combinatorial function block based on an interface of each function block in the at least two function blocks and the connection relationship between the at least two function blocks, and generating an interface corresponding to the combinatorial function block. Each function block in the multiple function blocks includes at least one input data item and at least one output data item corresponding to the interface corresponding to the function block, the at least one input data item and the at least one output data item being stored in the function block, and the splicing operation includes connecting at least some of the input data items and / or at least some of the output data items of the at least two function blocks.
[0088] The method for constructing combined function blocks provided by the present disclosure solves the problems of modularity and incomplete abstraction caused by using existing high-level languages to implement software. In the method for constructing combined function blocks provided in the embodiments of the present disclosure, by organizing the computational interactions between small function blocks to form larger combined function blocks, 100% modularization of the software structure can be achieved. During the combination process, only logical implementation needs to be considered, and non-modular statement-level development behavior is no longer required. At the same time, algorithm abstraction is also achieved, solving the problems of modularity and incomplete abstraction caused by using existing high-level languages to implement software.
[0089] In this method, the relationship between statements and data is no longer described. Instead, the relationship between each function block is described, and the data items are attached to the function block in the form of storage so that the description of the relationship between calculations can be converted into a description of the relationship between input and output storage; the function blocks are connected by means of connections to construct an algorithm program that implements a certain function, that is, a combination of function blocks, which fundamentally realizes modularization. Because each function block has its own storage, there is no need to define variables, and each variable no longer has actual meaning. In essence, the algorithm is highly abstracted and standardized, and has high portability. Because variables have no actual meaning, the code wall between different industries is broken.
[0090] In one embodiment of the present disclosure, the basic calculations of a high-level language (such as assignment expressions, conditional expressions, arithmetic expressions, logical expressions, etc.) are subdivided according to the type of data being calculated, and each subdivided basic statement is attached with input and output storage that matches the type of its data. For example, an addition statement is subdivided into the addition of the values of two integer type storages and output to another integer type storage, the addition of the values of two floating point type storages and output to another floating point type storage, and so on. By performing similar processing on all basic statements, multiple basic calculations for data items of multiple basic data types can be obtained. For example, in some embodiments, the number of basic calculations can be 67 and the number of basic data types can be 10, but the present disclosure is not limited to this. The number of basic calculations and the number of basic data types can be determined according to actual conditions. Attaching storage to function blocks allows the relationship description between function blocks to be converted into a description of the relationship between the input and output storage of the function blocks, thereby achieving modularization.
[0091] In this disclosure, if function blocks (basic function blocks and combined function blocks) are considered chips and type storage (input data items and output data items) are considered pins of the chip (with types), the method provided by this disclosure transforms the combination of function blocks into operations similar to connecting pins in hardware design, thus enabling the visual design of function blocks. Visualization operations do not involve naming storage, so the visual representation of function blocks (i.e., calculations) is abstract. The visual hardware-like organizational logic makes abstract calculations easier to understand.
[0092] Figure 1 A schematic diagram of a method for constructing a combined function block provided in some embodiments of the present disclosure.
[0093] For example, the function block library includes multiple function blocks. For example, the multiple function blocks include multiple basic function blocks and multiple combination function blocks. Multiple basic function blocks represent the smallest units that make up any combination function block, that is, in the present disclosure, the basic function block is the smallest function block and cannot be divided any further. Storage (i.e., data items) is attached to the multiple basic function blocks, and then the multiple basic function blocks and / or combination function blocks are combined to obtain a new combination function block. In the function block library, all combination function blocks are composed of these smallest basic function blocks. Any combination function block can eventually be split into multiple basic function blocks. For example, for any combination function block A, the combination function block A is composed of a combination function block B and a basic function block C1, and the combination function block B is composed of two basic function blocks C2 and C3, that is, in fact, the combination function block A is composed of three basic function blocks (i.e., basic function blocks C1, C2 and C3).
[0094] For example, each combinational function block is composed of at least one basic function block and / or at least one combinational function block.
[0095] like Figure 1 As shown, the method for constructing a combined function block includes the following steps S10 to S13.
[0096] Step S10: selecting at least one combination paradigm from a plurality of combination paradigms;
[0097] Step S11: obtaining an arrangement operation on at least two function blocks among the multiple function blocks to obtain a calculation sequence;
[0098] Step S12: performing a splicing operation based on the calculation sequence to determine a connection relationship between at least two function blocks;
[0099] Step S13: Based on the interface of each function block in the at least two function blocks and the connection relationship between the at least two function blocks, encapsulate the at least two function blocks into a combined function block, and generate an interface corresponding to the combined function block.
[0100] The method for constructing a combined function block provided by the present disclosure has the following characteristics:
[0101] 1. Support visual operation, intuitive, convenient and easy to learn.
[0102] 2. Separate algorithms and applications to form a public and unified algorithm representation space, establishing a theoretical foundation for 100% algorithm sharing across the entire industry.
[0103] 3. Standardized specification output, for example, generating Python code through visual operations.
[0104] 4. Combination function blocks can achieve high abstraction and high portability;
[0105] 5. No need to write any statements anymore, as symbolic language (eg, Extensible Markup Language (XML)) is automatically generated when constructing the combined function blocks.
[0106] For example, each of the multiple function blocks includes at least one input data item and at least one output data item corresponding to the interface corresponding to the function block, and the at least one input data item and the at least one output data item exist in the function block in a stored form, that is, the input data item and the output data item have data types, and there is no need to specify variable names, that is, at least one input data item and the at least one output data item do not need to specify variable names.
[0107] For example, in step S11, the arrangement operation may represent information such as the arrangement order and arrangement position of at least two function blocks. The arrangement operation may be determined based on the computational functions of the combined function blocks to be obtained by combination.
[0108] For example, in step S12 , the splicing operation includes connecting at least part of the input data items and / or at least part of the output data items of at least two function blocks.
[0109] In the process of obtaining the splicing operation of at least two function blocks, the connection relationship between the at least two function blocks can be determined.
[0110] A combined function block is formed by splicing and combining multiple function blocks. The connection between these blocks determines the computational functionality of the constructed combined function block. Specifically, the input and output data items (i.e., input and output parameters) of a combined function block can be generated by the connections between the input and output data items of multiple function blocks and the input and output data items of multiple function blocks. This principle, which is referred to as the combined formation principle, enables the formation of a large function block (i.e., a combined function block) from small function blocks.
[0111] For example, a basic way to combine calculations (i.e., function blocks) is as follows: if the data type attributes of the output data items of one calculation and the data type attributes of the input data items of another calculation (described later) meet the type matching rules (described later), then the two data items (i.e., storage) can be connected to form a combination of the two calculations. The input and output data items of the new calculation (combined function block) formed by the combination can be generated based on the input and output data items of the two calculations and the connection relationship between the two calculations.
[0112] For example, Figure 2AAs shown, calculation A1 includes three input data items t11, t12, and t13, and two output data items t14 and t15, and calculation A2 includes two input data items t14 and t16, and two output data items t17 and t18. For example, the data type attribute of the output data item t14 of calculation A1 matches the data type attribute of the input data item t14 of calculation A2 (for example, the data type attribute of the output data item t14 of calculation A1 is the same as the data type attribute of the input data item t14 of calculation A2), so that, as shown in FIG. Figure 2B As shown, the output data item t14 of calculation A1 and the input data item t14 of calculation A2 can be connected, thereby obtaining Figure 2C The combination shown forms a new calculation A3, for example, Figure 2C As shown, the new calculation A3 may include calculation A1 and calculation A2. Inside the new calculation A3, the output data item t14 of calculation A1 and the input data item t14 of calculation A2 are connected to each other. The input and output data items of the new calculation A3 can be generated based on the input and output data items of calculation A1 and calculation A2 and the connection relationship between calculation A1 and calculation A2, as shown in FIG. Figure 2D As shown, calculation A3 includes four input data items t11, t12, t13 and t16, and three output data items t15, t17 and t18. The output data item t14 of calculation A1 and the input data item t14 of calculation A2 are internally connected. Therefore, the output data item t14 of calculation A1 and the input data item t14 of calculation A2 are not used as input and output data items of calculation A3.
[0113] For example, in some embodiments, in step S11, the splicing operation is performed in sequence according to the following steps: combining at least two function blocks according to at least one combination paradigm among multiple combination paradigms; connecting at least part of the input data items and / or at least part of the output data items of the at least two combined function blocks.
[0114] For example, in some other embodiments, in step S11, the splicing operation is performed in sequence according to the following steps: connecting at least part of the input data items and / or at least part of the output data items of at least two function blocks; combining at least two function blocks after the connected data items according to at least one combination paradigm among multiple combination paradigms.
[0115] Based on the at least two function blocks, a calculation sequence corresponding to the at least two function blocks can be obtained.
[0116] In the embodiments of the present disclosure, the process of combining function blocks is a recursive process. Based on a defined and unique wiring rule and following type matching rules, a combination pattern is selected to combine multiple function blocks. With the nested use of the combination pattern, combined functions with various functions are ultimately formed. For example, function blocks are recursively generated, and data types are part of the function blocks and are also recursively generated.
[0117] In the present disclosure, the connection rule of the combination rule for combining multiple function blocks is: connecting the output data item or sub-data item of a function block to the input or output data items or sub-data items of other algorithm types in a one-to-many manner.
[0118] For example, in the methods provided by the embodiments of the present disclosure, there are four operational modes (i.e., combination paradigms) for function blocks. The aforementioned multiple combination paradigms include four combination paradigms. The operational modes for storage follow the data transfer connection rule. The data transfer connection rule must be followed in organizing function blocks using all four combination paradigms, and all of them are connections originating from output data items. During the organization of function blocks, a practical connection rule was added based on technical and practical considerations. The data transfer connection rule includes data transfer connections, which are directed segments that start from one data item and end at another. The practical connection rule includes auxiliary merge connections, which are undirected segments whose ends connect two data items. Data transfer connections include output-to-output data transfer connections (abbreviated as output-output connections) and output-to-input data transfer connections (abbreviated as output-input connections). Output-output connections are used to connect at least two output data items, and output-input connections are used to connect at least one input data item and at least one output data item. Auxiliary merge connections represent lines connecting multiple input data items. The meaning of the auxiliary merge line is equivalent to externally storing the input data items with the auxiliary merge line connected to the same output item by the data transfer line.
[0119] Multiple combination paradigms and connection rules (data transfer connection rules and practical connection rules) are jointly applied to function blocks, making it possible to construct large function blocks from small function blocks. Four operation modes for function blocks (i.e., four combination paradigms: sequential combination paradigm, conditional combination paradigm (if combination paradigm), loop combination paradigm (for combination paradigm), while loop combination paradigm (while combination paradigm)) and two operation modes for storage (i.e., data transfer connection and auxiliary merging connection) can be repeatedly nested and applied to basic function blocks and constructed combination function blocks based on the combination rules, thereby generating more combination function blocks. Function blocks constructed by combination rules are called combination function blocks and are represented by the symbol PF. Both basic function blocks and combination function blocks belong to the function block library collection.
[0120] Function combinations can be implemented by graphical operations plus a language for storing data (XML is used as an example in this disclosure). Users can use graphical visualization operations, which are simple, convenient, and easy to understand. Function combinations can also be implemented solely in XML.
[0121] For example, multiple combination paradigms include the sequential combination paradigm, the conditional combination paradigm (if combination paradigm), the loop combination paradigm (for combination paradigm), and the while loop combination paradigm (while combination paradigm). These combination paradigms can realize the process of combining small function blocks into large function blocks. The if combination paradigm is to combine the true function block and the false function block into a combination function block and form the input data items and output data items of the combination function block. The while combination paradigm and the for combination paradigm are to combine the conditional function block and the loop body function block (for example, the loop body function block may run multiple times) to form a combination function block and form the input data items and output data items of the combination function block. The sequential combination paradigm is to combine multiple function blocks with a determined execution order into a combination function block and form the input data items and output data items of the combination function block. For example, the structural framework of the sequential combination paradigm, the if combination paradigm, the while combination paradigm, and the for combination paradigm is fixed.
[0122] It should be noted that the sequential combination paradigm, the if combination paradigm, and the while combination paradigm are basic paradigms, and the for combination paradigm is an additional combination paradigm to facilitate the combination of function blocks.
[0123] For example, in step S13, when at least one combination paradigm is a sequential combination paradigm, the combination function block obtained by combination is a combination function block of a sequential structure; when at least one combination paradigm is a conditional combination paradigm, the combination function block obtained by combination is a combination function block of a conditional structure (if structure); when at least one combination paradigm is a loop combination paradigm, the combination function block obtained by combination is a combination function block of a loop structure (for structure); when at least one combination paradigm is a while loop combination paradigm, the combination function block obtained by combination is a combination function block of a while loop structure (while structure).
[0124] For example, in some embodiments, the method provided by the embodiments of the present disclosure further includes: storing the combined function block as a function block in a function block library to expand the function block library. The combined function block obtained by combining the function blocks in the function block library can be used as a function block to generate a new combined function block. That is to say, in the embodiments of the present disclosure, a plurality of function blocks are organized into corresponding combined function blocks, and then the combined function blocks obtained by combining can be reused in the organization of other combined function blocks to form a new combined function block, and the new combined function block can be applied again to the organization of the next layer of combined function blocks, and organized and nested layer by layer in turn, to finally realize a combined function block with corresponding functions, that is, to realize the final software design.
[0125] Each combination paradigm consists of three parts, namely the paradigm combination area, the large function interface area, the large function interface type and the small function interface type relationship area. The data type of the data item of the large function interface is a subset of the set consisting of the data types of all data items in the paradigm combination area and / or the data types of all data items in the paradigm combination area that are broken up and recombined. The data type / interface does not exist independently and does not need to be designed independently. It is generated by the combination paradigm to realize storage and computing integration. The paradigm combination area includes a small function block area and a combination action area. The small function block area is composed of the interface of at least one function block selected by the user from the function block library. The combination action area records the user's splicing actions on the function blocks in the small function block area; the large function interface area is automatically generated by the combination paradigm after the paradigm combination area is completed, and includes an input part and an output part. The data items of the input part are a subset of the set consisting of all input data items of the small function block area and / or all input data items of the small function block area are broken up and recombined. The data items of the output part are a subset of the set consisting of all output data items of the small function block area and / or all output data items of the small function block area are broken up and recombined. All large function interface areas generated by the combination paradigm follow the same function interface specification; the large function interface type and small function interface type relationship area records the data item relationship between the function interface of the large function interface area and the small function block area generated by the combination paradigm. The large function interface type and small function interface type relationship area is also automatically generated by the combination paradigm after the paradigm combination area is completed.
[0126] When performing algorithm programming, the prior art generally adopts a top-down approach to conceive the entire algorithm, first designing the interface part of the algorithm, defining each data item in the form of variable names, and then writing the algorithm statement within the algorithm. The statement references the defined variables to represent the calculation of the variables. During the writing process, the reference relationship between the algorithm process and the algorithm interface is repeatedly confirmed. During the algorithm writing process, local variables within the algorithm are generally generated at the same time. During the writing process, the relationship between the algorithm statement and the local variables, and the relationship between the local variables and the interface definition variables are repeatedly confirmed. The entire process is completely manual. The present application adopts a bottom-up approach. The process of conceiving the algorithm is to manually select the combination paradigm, select the storage and calculation integrated function block, and the splicing and connection actions between the function blocks. While completing the algorithm logic, the function interface and the relationship between the function interface and the data items of the internal function block are automatically generated. There is no need to manually write and confirm the local variables, interface variables, and the relationship between each variable and the algorithm.
[0127] For example, each function block in the plurality of function blocks has its corresponding computing function. The method provided by the embodiment of the present disclosure further includes: determining the computing function of the combined function block based on the computing functions and connection relationships of at least two function blocks.
[0128] For example, each basic function block in a plurality of basic function blocks has its corresponding computing function, and the computing function of each combined function block is determined based on the computing function and connection relationship of at least one basic function block and / or at least one combined function block. That is, in the present disclosure, the computing function of each combined function block can be determined based on the computing function and connection relationship of the multiple function blocks that combine the combined function block. That is, in the present disclosure, the input (input part of the interface of the combined function block) and output (output part of the interface of the combined function block) relationship of the formed combined algorithm (combined function block) can be obtained based on the known algorithm (the computing function of at least two function blocks) and the action relationship between the known algorithms (the connection relationship between at least two function blocks). It should be noted that different computing functions can be expressed by making different connections between multiple function blocks in the same calculation sequence.
[0129] For example, in an embodiment of the present disclosure, the process of combining combined function blocks with corresponding computing functions includes: according to the requirements of the corresponding computing function, the function blocks and combination paradigms required to implement the corresponding computing function can be determined, and then the required multiple function blocks can be selected from the function block library, and the multiple function blocks can include basic function blocks and combination function blocks. Then, based on the corresponding computing function and combination paradigm, the execution order and arrangement position of the selected multiple function blocks can be determined, that is, the multiple function blocks are combined to obtain a computing sequence corresponding to the multiple function blocks; then, the computing sequence is spliced and connected to obtain an intermediate combined function block; it is determined whether the intermediate combined function block implements the corresponding computing function, and in response to the intermediate combined function block implementing the corresponding computing function, the intermediate combined function block is used as the combined function block corresponding to the corresponding computing function; in response to the intermediate combined function block not implementing the corresponding computing function, function blocks are continuously selected from the function block library for combination until the intermediate combined function block obtained by combination can implement the corresponding computing function, and the intermediate combined function block is used as the combined function block that implements the function to be designed, thereby achieving the combination of the combined function block that implements the corresponding computing function. The combined function block can be stored in the function block library for subsequent combination. In this way, there will be more and more function blocks in the function block library that implement specific algorithm functions. When all the function blocks contained in the function blocks to be combined exist in the function block library, the corresponding function blocks can be directly used for combination.
[0130] For example, each function block (basic function block and combined function block) in a plurality of function blocks can be presented in a graphical form, and the graphical form can present the function block to the user in a simple, convenient and intuitive manner. In the computer background, the graphical form corresponds to a symbolic language. That is to say, in the present disclosure, each function block can have a two-dimensional form of expression, that is, two formalization methods, namely, visualization and corresponding symbolic language, thereby enriching the form of expression of the function block, and visual operation can be achieved based on the graphical form of expression. Both of these forms of expression can independently and completely express the syntax and programming process of the function block. The user can perform visual operations on the graphics corresponding to the function block, which is simple, convenient and easy to understand, or can also edit the symbolic language corresponding to the function block to achieve operation on the function block.
[0131] For example, in the present disclosure, each data item (input data item and output data item) may also have both graphical and symbolic language representations.
[0132] For example, in some embodiments, the symbolic language includes Extensible Markup Language (XML) and JSON (JavaScript Object Notation). In the following description of the present disclosure, XML and JSON are used as examples to describe various function blocks, but the present disclosure includes but is not limited to them.
[0133] In addition, in an embodiment of the present disclosure, a function block and / or each storage (input data item and output data item, etc.) of a function block can be given an (application) name, and this behavior is called concretization. These names do not intervene in the organizational behavior of the function block, but only serve as comments to increase the readability of the function block and its input data items and output data items. If the combined function block obtained by the combination is compiled into a high-level language, some names will become variable names. If the combined function block obtained by the combination is compiled into machine code, these names will not be used. In addition, the symbolic representation of the combined function block is used to store the results of the visual design and provide input for the compiler. The user does not need to operate the symbolic representation of the combinational language.
[0134] For example, for each function block in a plurality of function blocks, the interface corresponding to the function block includes an input part and an output part, the input part of the interface corresponding to the function block corresponds to at least one input data item of the function block, and the output part of the interface corresponding to the function block corresponds to at least one output data item of the function block. That is to say, in an embodiment of the present disclosure, each function block corresponds to an interface, and the interface includes an input part and an output part, the input part corresponds to at least one input data item, and the output part corresponds to at least one output data item. In some embodiments, the individual input data items in the input part of each interface can be combined into an input data item of a combined data type, and the individual output data items in the output part of each interface can be combined into an output data item of a combined data type.
[0135] For example, at least one input data item and at least one output data item each include a data type attribute, a data category attribute, a storage type attribute, a value attribute, a physical address attribute, a relative address attribute, a name attribute, and the like.
[0136] It should be noted that in this disclosure, input data items and output data items may be collectively referred to as data items. Depending on the location of the data item, the data item may be an input data item or an output data item. For example, if a data item is located in the input portion of the interface corresponding to a function block, the data item is an input data item; if a data item is located in the output portion of the interface corresponding to the function block, the data item is an output data item. For example, in this disclosure, a data item has a storage function.
[0137] For example, the name attribute (id attribute) is used to annotate the data item corresponding to the name attribute, and does not participate in the splicing operation of the function block to which the data item corresponding to the name attribute belongs. The technical solution provided by the present disclosure can realize abstract algorithm design, that is, the combination process of the function block provided by the present disclosure does not involve variable names, it is an abstract algorithm representation and design, and it is an algorithm representation and design method common to all different applications, thereby realizing algorithm sharing between different applications. The application is reflected in the id attribute of the data item. The value of the id attribute can be the application name to facilitate the description of the algorithm with the concept of the application, but the id attribute does not intervene in the algorithm design and operation, but only serves as a comment. If it is necessary to compile the extensible markup language corresponding to each function block into a traditional high-level language, the name attribute is compiled into the variable name in the high-level language. The relative address of the data item is automatically processed by the algorithm.
[0138] For example, the physical address attribute (name attribute) is used to indicate the physical address of the data item when the algorithm (the algorithm determined based on the function block) is actually running.
[0139] For example, the relative address attribute is used to represent the sequential code value of the data item and can be automatically calculated by the algorithm. In the XML expression form of the data item, the relative address attribute may not be reflected.
[0140] For example, data category attributes include basic data types, composite data types, pointer types, and generics. Composite data types further include basic composite data types, XOR types, array types, etc. Pointer types include general pointer types and non-general pointer types. A data item of a general pointer type does not have a specific data item to which it points, that is, the data item of the general pointer type points to null. A data item of a non-general pointer type has a specific data item to which it points. A data type attribute refers to the type of a data item. A storage type attribute includes virtual storage and real storage. For example, in some embodiments, in an extensible markup language (XML) architecture, a storage type attribute can be represented as memory. When memory is 1, it indicates real storage, and when memory is 0, it indicates virtual storage. By default, memory is 1, and memory can be determined by a splicing action. For example, in some embodiments, in a graphical representation, if the storage type attribute of a data item is real storage, the circle representing the data item is a solid circle; if the storage type attribute of a data item is virtual storage, the circle representing the data item is a hollow circle. It should be noted that, in the graphical representation, the present disclosure is not limited to using circles to represent data items, and data items can also be represented by rectangles, diamonds, etc. In the description of the present disclosure, the embodiments of the present disclosure are described by taking the use of circles to represent data items in the graphical representation as an example.
[0141] It should be noted that in the following description, for the sake of convenience, if the data category attribute of a data item is a composite data type, the data item can be called a composite data item; if the data category attribute of a data item is a basic data type, the data item can be called a basic data item; if the data category attribute of a data item is a pointer type, the data item can be called a pointer data item; if the data category attribute of a data item is generic, the data item can be called a generic data item.
[0142] For example, for a data item whose data category attribute is a composite data type (the data item can be an input data item or an output data item), the data item of the composite data type includes multiple data items whose data category attribute is a basic data type, or includes multiple data items whose data category attribute is a composite data type, or includes multiple data items whose data category attribute is a pointer type, or includes multiple data items whose data category attribute is a generic type, or the data item of the data item of the composite data type includes data items whose data category attributes are at least two of the following data category attributes: basic data type, composite data type, pointer type, and generic type. That is to say, the data item of the composite data type is composed of one or more data items of the basic data type and / or one or more data items of the composite data type, one or more data items of the pointer type, and / or one or more data items of the generic type.
[0143] For example, the structural formats of data items whose data category attributes are basic data types, data items whose data category attributes are composite data types, data items whose data category attributes are pointer types, and data items whose data category attributes are generic are the same and standardized. The structure of data items whose data category attributes are composite data types is a nested structure, and the structural format of data items in each layer of the nested structure is the same.
[0144] For example, basic data types include, but are not limited to, byte data types (byte), short integers (short), integers (int), long integers (long), single-precision floating-point types (float), double-precision floating-point types (double), Boolean types (boolean), character types (char), and character strings (string). It should be noted that basic data types are not limited to the above data types. You can choose the basic data types of a high-level language, or you can choose only bits (bit, 0, 1), etc. For practicality, you can choose the basic data types corresponding to the high-level language. It should be noted that basic data types can also include constant types, and data items of constant types have specific constant values.
[0145] In addition to basic data types, there are pointer types (ref) and generics (*). Pointer type data items represent physical addresses stored at actual runtime, and generic data items represent uncertain data types, which can represent any data type.
[0146] Data items can be stored in a variety of formats, such as XML, JSON, or any format with specific rules, as shown below:
[0147] For example, the XML expression of a data item (input data item or output data item) may be as follows:<type id=""name=""value=""typeclass=""typevalue=""typeid=""memory="" / > .
[0148] Among them, id represents the annotation name of the data item (i.e., the concrete name), which represents the meaning of the data item in the data structure corresponding to the data item. It can be concretely named by the user and does not participate in the organization and calculation of the function block; name is used to represent the physical address of the data item when the algorithm (algorithm determined based on the function block) is actually running. The relative position of the data item is determined by the XML structure; value represents the value attribute of the data item. The value of the data item of the composite data type is jointly determined by the value of the internal data item of the data item of the composite data type; typeclass represents the data category attribute of the data item; typevalue represents the data type attribute, that is, the actual data type of the data item, such as basic data types such as int and char, and composite data types such as int2; typeid represents the user-defined data type name, that is, in this application, users can customize some data types. In some embodiments, typeid and typevalue can be the same; memory represents the storage type of the data item. If the value of memory is 0, it means that the data item is virtual storage. If the value of memory is 1, it means that the data item is real storage. For example, typeclass can be represented by a number. When typeclass is 0, it represents a basic data type; when typeclass is 1, it represents a basic composite data type; when typeclass is 2, it represents an array type; when typeclass is 3, it represents an XOR type; when typeclass is 4, it represents a pointer type ref; and when typeclass is 5, it represents a generic type. It should be noted that the basic composite data type, array type, and XOR type are all composite data types. The data items of the basic composite data type can be composed of basic data types, pointer types, and generic types. For example, two data items of type int are combined to obtain a data item int2, and the type of the data item int2 is a basic composite data type. For example, a data item charref is combined to obtain a data item of type char and a data item of type pointer. The type of the data item charref is a basic composite data type. Pointer type ref and generic types are neither basic data types nor composite data types.
[0149] Only id, typeid, and the value of data items of basic data types can be set by the user, so only the graphical representation related to the settings of these three attributes (i.e., id, typeid, and the value of data items of basic data types) is provided, so that users can modify or set the above three attributes in the graphical representation.
[0150] For example, the following shows the XML schema for data items of some basic data types:
[0151] <type id=""name=""value=""typeclass="0"typevalue="byte"typeid="byte" / >
[0152] <type id=""name=""value=""typeclass="0"typevalue="short"typeid="short" / >
[0153] <type id=""name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0154] <type id=""name=""value=""typeclass="0"typevalue="long"typeid="long" / >
[0155] <type id=""name=""value=""typeclass="0"typevalue="float"typeid="float" / >
[0156] <type id=""name=""value=""typeclass="0"typevalue="double"typeid="double" / >
[0157] <type id=""name=""value=""typeclass="0"typevalue="boolean"typeid="boolean" / >
[0158] <type id=""name=""value=""typeclass="0"typevalue="char"typeid="char" / >
[0159] <type id=""name=""value=""typeclass="0"typevalue="string"typeid="string" / >
[0160] For example, the following shows the XML schema for a data item of pointer type and generic type:
[0161] <type id=""name=""value=""typeclass="4"typevalue="ref"typeid="ref" / >
[0162] <type id=""name=""value=""typeclass="5"typevalue="*"typeid="*" / >
[0163] For example, if a data item of pointer type has a data item it points to, then the typevalue of the data item of pointer type is the symbol "&" plus the data type of the data item pointed to by the data item of pointer type. For example, a pointer pointing to a data item of int2 type, the typevalue of the pointer data item is &int2. If a data item of pointer type does not point to any data item, the data item of pointer type is a data item of general pointer type. The internal structure of the data item of general pointer type is empty and does not contain any other data description. If the data type of a data item is a pointer type and it points to other data items, the data item of pointer type is a data item of non-general pointer type. The data item of non-general pointer type contains descriptions of other data items. The other data items can be basic data types, basic composite data types, array types, and XOR types. For example, if the data item pointed to by a data item of pointer type is a data item of integer type, then the data item of pointer type is a data item of non-general pointer type. The XML description of the data item of non-general pointer type is:
[0164] <type id=""name=""value=""typeclass="4"typevalue="&int"typeid="ref">
[0165] <type id=""name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0166] .
[0167] For example, data items of basic data types, pointer types, and generic types can be combined into data items of composite data types. Data items of composite data types can also be further combined with other data items (data items of composite data types, data items of basic data types, pointer types, or generic types) to obtain new data items of composite data types. For example, in an embodiment of the present disclosure, data items of basic data types have a basic data structure, and data items of composite data types have a composite data structure, that is, the data structure of data items of composite data types is called a composite data structure, and the data structure of data items of basic data types is called a basic data structure, data items of general pointer types and generic data items (that is, their data category attributes are generic) have a data structure consistent with the basic data structure, and data items of non-general pointer types have a data structure consistent with the composite data structure.
[0168] The JSON representation of the data item is as follows:
[0169] {
[0170] "id":"",
[0171] "name":"",
[0172] "value":"",
[0173] "typeclass":"",
[0174] "typevalue":"",
[0175] "typeid":"",
[0176] "memory":""
[0177] }
[0178] Tags represent attributes in the same way as in XML. For example, in JSON, "name" represents the physical address of the data item when the algorithm (based on the algorithm defined by the function block) is actually running. The relative address of the data item within the corresponding data structure can be automatically calculated by the algorithm and does not need to be reflected in the JSON representation of the data item.
[0179] Other formats with specific rules for data items are as follows:
[0180] <"","","","","",""," / >
[0181] It specifies that the seven attribute values in the angle brackets <> are arranged in order, representing the corresponding values of id, name, value, typeclass, typevalue, typeid, and memory in XML in that order.
[0182] The format representations of data items and all new concepts that appear later have multiple representation forms. In this embodiment, they are all represented in XML format, but the present disclosure is not limited to this.
[0183] If a data item is of a non-generic pointer type, that is, typeclass = 4 and contains other data items, the data item can be expanded. The expansion action has no effect on the data type attributes and data category attributes of the data item and the data items contained within it. If the data items contained within the pointer data item are also composite data types (basic composite data types, XOR types, array types) or non-generic pointer type data items, the expansion action can continue to be applied to the data items contained within until the type of the data item meets the type matching rule or the data item is a basic data type, a generic pointer type, or a generic type.
[0184] Figure 3A A schematic diagram of a graphical representation of a data item provided in some embodiments of the present disclosure; Figure 3B A schematic diagram of a graphical representation of an integer data item provided in some embodiments of the present disclosure.
[0185] For example, Figure 3A shows a graphical representation of a data item id, such as Figure 3A As shown in the figure, a solid circle can represent a data item of a basic data type, i.e., storage. The variable name id represents the annotation name of the data item; the attributes of the data item can include: data type attribute, whether it is a constant (the value of constant data is a fixed value and cannot be modified in subsequent operations. If it is a constant, it also has a constant value attribute).
[0186] For example, in some examples, Figure 3B The figure shows a graphical representation of an int data item a. The XML schema of the data item a is represented as follows:
[0187] <type id="a"name=""value=""typeclass="0"typevalue="int"typeid="int" / > .
[0188] The JSON representation of the data item a is:
[0189] {
[0190] "id":"a",
[0191] "name":"",
[0192] "value":"",
[0193] "typeclass":"0",
[0194] "typevalue":"int",
[0195] "typeid":"int",
[0196] "memory":""
[0197] }
[0198] For example, the XML schema for constant data item a is represented as:
[0199] <type id="a"name=""value="1"typeclass="0"typevalue="int"typeid="int" / > .
[0200] Among them, value=1, which means that the value of the constant data item a is 1.
[0201] For example, in a graphical expression, a blue solid circle may be used to represent a non-constant data item, and a yellow solid circle may be used to represent a constant data item.
[0202] Other representations of the constant data item a can be:
[0203] <"a","","1","0","int","int","" / >
[0204] For example, two int-type data items are IdName1 and IdName2. The two int-type data items are combined to obtain a combined data item int2. The XML schema of the combined data item int2 is represented as follows (it should be noted that the data item of type int2 only exists in the basic function block):
[0205] <type id="int2"name=""value=""typeclass="1"typevalue="int2"typeid="int2">
[0206] <type id="IdName1"name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0207] <type id="IdName2"name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0208] .
[0209] For example, the input and output data items formed according to the combination rules during the combination process of the function block are combination data items outside the scope of basic data types, pointer types and generics. The data items of the combination data type (i.e., combination data items) are ordered sets of input and output data items in the interface of the combination function block, and can be expanded to basic data types, general pointer types, and generic data items in the combination function block.
[0210] For example, a combined data item is a data item (input data item and output data item) formed according to the combination rules during the combination process of the function block. The combined data item can represent an ordered set of input data items and an ordered set of output data items in the interface of the combined function block.
[0211] For example, in some examples, the XML representation of a data item of a composite data type (i.e., a composite data item) is:
[0212] <type id="(int2)int"name=""value=""typeclass="1"typevalue="(int2)int"typeid="(int2)int">
[0213] <type id="int2"name=""value=""typeclass="1"typevalue="int2"typeid="int2">
[0214] <type id="11"name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0215] <type id="12"name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0216]
[0217] <type id="21"name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0218]
[0219] For example, the nested structure of the composite data item can represent the relative position of the composite data item in the data structure. The relative position generation rule of the data item includes: in the same-layer data structure, the relative position value is encoded starting from 0 and increasing in integer order. For example, in the above XML, for the composite data type data item (int2)int, data item int2 and data item 21 are two data items in the same-layer data structure of data item (int2)int. Data item int2 with the data type attribute of int2 is the first data item in the data structure of the composite data item (int2)int. Therefore, the relative position value of data item int2 is 0. Data item 21 is the second data item in the data structure of the composite data item (int2)int. Therefore, the relative position value of data item 21 is 1. For data item int2, data item 11 is the first data item of data item int2. The relative position value of data item 11 is 0. Data item 12 is the second data item of data item int2. The relative position value of data item 12 is 1. And so on. The relative position encoding rule of each layer of data structure is the same. The relative position does not need to be described using attribute symbols. It is determined by the structure of the data item and can be automatically calculated and obtained by the algorithm according to the relative position encoding rules.
[0220] For example, the positioning of a data item includes: positioning the data item x, starting from the outermost layer of the combined data structure of the combined data item where the data item is located, and expressing it along the path of the data item x in the combined data structure using a relative position value plus a ".". For example, in the above XML, the positioning of the data item 12 starts from the outermost data item (int2)int, traverses along the path from the data item (int2)int to the data item int2, and uses the relative position value, so that the relative path of the data item 12 in the data structure is 0.0.1, wherein the first 0 in the relative path 0.0.1 represents the relative position value of the data item (int2)int, the second 0 in the relative path 0.0.1 represents the relative position value of the data item int2, and the 1 in the relative path 0.0.1 represents the relative position value of the data item 12; similarly, the relative path of the data item int2 is 0.1; and the relative path of the data item (int2)int is 0. It should be noted that, since data item 11 and data item 12 are data items of the same layer, the relative position value of data item 11 is not included in the relative path of data item 12 .
[0221] For example, the value of typevalue in a composite data item can be omitted. When the typevalue attribute is used, the naming rules for typevalue (i.e., type tag) in a data item of a basic composite data type include: for a data item of a composite data structure in a basic function block, the typevalue of the data item is composed of the basic data type, pointer type, and generic type contained within the data item. The representation of the typevalue of a data item is: (basic data type, pointer type, generic type) + quantity. For example, the input part of the interface of an addition function block of type int is composed of two input data items of type int, that is, the data type attribute of the composite data item obtained by combining is represented as int2. For example, the XML representation of the input part is:
[0222] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="int2">
[0223] <type id=""name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0224] <type id=""name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0225]
[0226] For example, the naming convention for typevalues in data items of basic composite data types also includes the following: For data items of composite data structures within composite function blocks, the typevalue of the data item consists of the composite data type, the basic data type, the pointer type, or the generic type contained within the data item. The typevalue of a data item is represented as: basic data type / pointer type / generic type 1 + (composite data type 1) + ..., where () represents the composite data type.
[0227] For example, the XML representation of a data item T of a composite data structure is:
[0228] <type id=""name=""value=""typeclass=""typevalue="T"typeid="">
[0229] <type id=""name=""value=""typeclass=""typevalue="t1"typeid="" / >
[0230] <type id=""name=""value=""typeclass=""typevalue="t2"typeid="" / > ......
[0231] <type id=""name=""value=""typeclass=""typevalue="tn"typeid="" / >
[0232]
[0233] As shown in the XML above, assuming that the data item T of the basic composite data structure is composed of data type attributes t1, t2, ..., tn, then the actual data type attributes of the data item T are t1t2 ... tn. For 1 ≤ k ≤ n, if tk is a composite data type or a non-generic pointer type, then in the naming of the actual data type attribute of the data item T, tk is replaced by the data type attribute of its internal data item and enclosed in brackets. This rule is recursively followed until the data item is a basic data type, a general pointer type, or a generic data item.
[0234] For example, the XML representation of the input part of the interface corresponding to the combined function block representing the function (a>b)&&c is as follows: <type id=""name=""value=""typeclass="1"typevalue="(int2)(boolean2)"typeid="(int2)(boolean2)">
[0235] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="int2">
[0236] <type id=""name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0237] <type id=""name=""value=""typeclass="0"typevalue="int"typeid="int" / >
[0238]
[0239] <type id=""name=""value=""typeclass="1"typevalu="boolean2"typeid="boolean2">
[0240] <type id=""name=""value=""typeclass="0"typevalue="boolean"typeid="boolean" / >
[0241] <type id=""name=""value=""typeclass="0"typevalue="boolean"typeid="boolean" / >
[0242]
[0243] Referring to the above XML, the combined function block includes a basic function block for a relational expression and a basic function block for a logical expression. The typevalue representation of the data item (int2)(boolean2) of the combined data type corresponding to the input portion is: (int2)(boolean2). The data item (int2)(boolean2) is composed of two data items of the combined data type, int2 and boolean2. The data item int2 is composed of two data items of the basic data type (int), and the data item boolean2 is composed of two data items of the basic data type (boolean). It should be noted that if, after the wiring process, one of the data items boolean in the data item boolean2 is not extracted as the input portion of the interface, then the data item boolean2 is broken up, and the data items in the data item boolean2 that are not extracted as the input portion of the interface are not reflected in the interface. The data items in the data item boolean2 that are extracted as the input portion of the interface are combined with the data item int2 to obtain the input portion. At this time, the typevalue representation of the data item of the combined data type corresponding to the input portion is: (int2)boolean.
[0244] For example, the splicing operation also includes data item expansion rules, type matching rules and connection requirement rules, which correspond to data item expansion actions and connection actions (i.e., connection operations), that is, based on the data item expansion rules, the data item can be expanded, and based on the type matching rules and / or connection requirement rules, the data item can be connected. If the data category attribute of the data item is a basic composite data type, i.e., typeclass=1, the data item can be expanded, and the expansion action has no effect on the data type attribute and data category attribute of the data item and the data items contained therein. If the data items contained in the composite data item are also composite data types (basic composite data types, XOR types, array types), or non-general pointer types, the expansion action can continue to be applied to the data items contained therein until the type of the data item meets the type matching rules or the data item is a basic data type, a general pointer type, or a generic type.
[0245] Assume that data item d is composed of n data items d1, d2, ... dn, and the data categories of the n data items are tc1, tc2, ... tcn, and the types of the n data items are t1, t2, ... tn, where n>1. The data item d is a data item of a basic combined data type. Assume that data item s is composed of m data items s1, s2, ... sm, and the data categories of the m data items are tcf1, tcf2, ... tcfm, and the types of the n data items are tf1, tf2, ... tfm, where m>1. Then data item d and data item s are combined in an XOR manner to form an XOR type combined data item. The typeclass of the XOR type combined data item is 3. The typevalue of the XOR type combined data item is the typevalue of data item d and the typevalue of data item s connected together with the XOR symbol. The XOR type combined data item contains data item d and data item s. The XML description corresponding to the XOR type combined data item is as follows:
[0246] <type id=""name=""value=""typeclass="3"typevalue="t1t2...tnxortf1tf2...tfm"typeid="">
[0247] <type id="d"name=""value=""typeclass="1"typevalue="t1t2...tn"typeid="">
[0248] <type id=""name=""value=""typeclass="tc1"typevalue="t1"typeid="" / >
[0249] <type id=""name=""value=""typeclass="tc2"typevalue="t2"typeid="" / >
[0250] <type id=""name=""value=""typeclass="tcn"typevalue="tn"typeid="" / > ......
[0252]
[0253] <type id="s"name=""value=""typeclass="1"typevalue="tf1tf2...tfm"typeid="">
[0254] <type id=""name=""value=""typeclass="tcf1"typevalue="tf1"typeid="" / >
[0255] <type id=""name=""value=""typeclass="tcf2"typevalue="tf2"typeid="" / > ......
[0257] <type id=""name=""value=""typeclass="tcfm"typevalue="tfm"typeid="" / >
[0258]
[0259]
[0260] The data items d and s within this XOR-type composite data item can be primitive data types, primitive composite data types, XOR types, array types, pointer types, generic types, and so on. It should be noted that XOR-type data items have an XOR structure. The typevalue value of an XOR-type data item can be omitted and automatically calculated by the algorithm.
[0261] A graphical representation of an XOR type combined data item may be a solid circle (eg, blue) with a '+' symbol (eg, Figure 9F For example, an XOR-type combined data item is formed by the XOR of data item T1 and data item T2. The XML representation of the XOR-type combined data item is as follows:
[0262] <type id=""name=""value=""typeclass="3"typevalue="T1xorT2"typeid="">
[0263] <type id=""name=""value=""typeclass=""typevalue="T1"typeid="" / >
[0264] <type id=""name=""value=""typeclass=""typevalue="T2"typeid="" / >
[0265]
[0266] The JSON representation of the above XOR type combined data items is:
[0267] {
[0268] "id":"",
[0269] "name":"",
[0270] "value":"",
[0271] "typeclass":"3",
[0272] "typevalue":"T1xorT2",
[0273] "typeid":"",
[0274] "memory":"",
[0275] "children":[{
[0276] "id":"",
[0277] "name":"",
[0278] "value":"",
[0279] "typeclass":"",
[0280] "typevalue":"T1",
[0281] "typeid":"",
[0282] "memory":""
[0283] },{
[0284] "id":"",
[0285] "name": "",
[0286] "value": "",
[0287] "typeclass": "",
[0288] "typevalue": "T2",
[0289] "typeid": "",
[0290] "memory": ""
[0291] }]
[0292] }
[0293] For the combined data item of the exclusive - or type, that is, typeclass = 3, an expansion action can be performed on the combined data item of the exclusive - or type. The expansion action has no impact on the data type attributes and data category attributes of the combined data item of the exclusive - or type and the data items it contains. If the data items contained within the combined data item of the exclusive - or type are also of combined data types (basic combined data type, exclusive - or type, array type), non - general pointer types, the expansion action can be continuously applied to the contained data items until the type of the data item meets the type - matching rules or the data item is of a basic data type, general pointer type, or generic type.
[0294] For example, the array data item a is a data item that contains n data items of type T internally. n can be any constant or a variable. The type T can be a basic data type, basic combined data type, exclusive - or type, array type, pointer type, or generic type. For the n data items of type T, a simplified representation can be given by providing only one data item description. The data type attribute of the array data item a is T[], and the data category attribute is 2. The xml representation of an array data item of type T[] is as follows:
[0295] <type id = "a" name = "" value = "" typeclass = "2" typevalue = "T[]" typeid = "">
[0296] <type id = "" name = "" value = "" typeclass = "0, 1, 2, 3, 4 or 5" typevalue = "T" typeid = "" / >
[0297]
[0298] The value of typevalue for a data item of array type can be omitted and calculated automatically by the algorithm.
[0299] It is allowed to perform expansion actions on array data items of composite data types. The expansion action affects the data type attributes and data category attributes of the array data item and the data items contained inside it. The operation process of the expansion action is as follows: If the array data items contained inside the expanded data item are also array data items of composite data types, the expansion action can continue to be applied to the array data items of the composite data type contained inside until the type of the data item meets the type matching rule or the data item is an array of basic data types, a pointer type array, or a generic array.
[0300] Assume an array data item T[], the data category attribute of the array data item T[] is 2, and the data type attribute of the array data item T[] is T[]. If T is a composite data type, the array data item T[] contains a composite data item of type T, and the composite data item contains k data items. The data type attributes of the k data items are t1, t2, ..., tk respectively. Then the data category attribute of T may be 1 or 3 (except for basic data types), and the data type attributes of T are t1t2...tk. Expand the array data item T[]. , N-ization is performed on k data items to form k array data items t1[], t2[], ...tk[]. The data category attribute of each of the k array data items is 2. At the same time, following the combination rules of data types, the array data item T[] becomes a combined data item D formed by the combination of t1[], t2[], ...tk[]. That is, the N-ization of T[] is canceled. The data category attribute of the combined data item D is the same as the data category attribute of the array data item T (possibly 1 or 3). The data type attribute of the combined data item D is t1[]t2[]...tk[]. If there is a combined data type in t1, t2, ..., tk, the expansion operation can be recursively applied to the combined data type array until the following two conditions are met, terminating the expansion operation: first, the data item at this time is a basic type array and cannot be expanded; second, when the user's connection operation requirements are met, the expansion operation can be stopped. The array logical equivalent transformation rule indicates that the array data item T[] can be represented as a combined data item D formed by combining t1[], t2[], ...tk[].
[0301] Assume an array data item T[], the data category attribute of the array data item T[] is 2, and the data type attribute of the array data item T[] is T[]. If T is an array of a composite data type, that is, T itself is an array, and the array contains m data items t1, t2, ..., tm, then the data type attribute of T is (t1t2...tm)[], the data category attribute of T is 2, and the data type attribute of the array data item T[] is ((t1t2...tm)[])[]. To expand the array data item T[], you need to first Expand T, that is, first expand the (t1t2...tm)[] data item. The expansion action is as described above, and (t1t2...tm)[] is expanded to t1[]t2[]...tm[]. At this time, the data type attribute of the array data item T[] is (t1[]t2[]...tm[])[], and the data category attribute is 2. If there are arrays of combined data types in t1, t2, ..., tm, the arrays of combined data types in t1, t2, ..., tm are expanded first, and then the upper array is expanded.
[0302] For example, for the array logical equivalence rule, the specific operation is expressed as: the expansion rule of the array structure, that is, for the function block where the array type data item is located, the array type data item can be logically equivalently expanded, and the operation needs to be performed according to the following description: Assume that the output data item of the current layer of the function block is an array type data item, the data category attribute of the array type data item is 2, and the data type attribute is ((t1t2)t3)[]. The data item of this array type is a composite data type array, which contains a composite data type data item D1 (data type attribute is t1t2) and a basic data type data item D2 (data type attribute is t3). The composite data type is ((t1t2)t3) and the data category attribute is 1. When expanding an array-type data item, the data items D1 and D2 contained within the data item are logically N-ized into array form, forming two array data items with data type attributes (t1t2)[] and t3[], and a data category attribute of 2. The original data item T[] is then un-N-ized, and according to the typevalue generation rule, a data item with a data type attribute of (t1t2)[]t3[] and a data category attribute of 1 is generated. The expanded array data item with a data type attribute of (t1t2)[] can be further expanded as desired. However, since the data item with a data type attribute of t3[] is an array of a basic data type and does not meet the expansion conditions, further expansion of the data item with a data type attribute of t3[] cannot be performed. For input data items, refer to the above description for output data items. After expansion, the array data items can be merged by reversing the above steps until the first level of data items is reached.
[0303] Figures 3(1)A to 3(1)F A storage hierarchy structure diagram of the interface of the function block provided for some embodiments of the present disclosure. As shown in Figure 3(1)A, it is a function block with an array data item of a basic combined data type. Figure 3(1)A is a storage hierarchy structure diagram of the interface of the function block when it is not expanded. Figure 3(1)B is the form after the array data item is expanded. Figure 3(1)B is the storage hierarchy structure diagram of the interface of the function block after it is expanded to the second layer. Figure 3(1)A is the form after the array data items of Figure 3(1)B are merged. Figure 3(1)C is a function block with an array data item of an XOR combined data type. Figure 3(1)D is the form after the array data item is expanded. Figure 3(1)C is the form after the array data item of Figure 3(1)D is merged. Figure 3(1)E is a function block with an array type data item inside. Figure 3(1)F is the form after the array is expanded. Figure 3(1)E is the form after the array of Figure 3(1)F is merged. It should be noted that Figures 3(1)A to 3(1)F The specific meaning of each part in the storage hierarchy diagram shown will be described below.
[0304] For example, for a data item of an array type with a data type attribute of ((t1t2)t3)[], its XML representation is as follows:
[0305] <type id="" name="" value="" typeclass="2" typevalue="((t1t2)t3)[]" typeid="" / >
[0306] <type id="" name="" value="" typeclass="1" typevalue="((t1t2)t3)" typeid="" / >
[0307] <type id="" name="" value="" typeclass="1" typevalue="t1t2" typeid="" / >
[0308] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t1" typeid="" / >
[0309] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t2" typeid="" / >
[0310]
[0311] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t3" typeid="" / >
[0312]
[0313]
[0314] Figure 10H Shows a storage hierarchy diagram of the interface of a function block including the data item of the above array type, Figure 10I Shows a storage hierarchy diagram when the first-level expansion is performed on the data item of the above array type, Figure 10J Shows a storage hierarchy diagram when the second-level expansion is performed on the data item of the above array type.
[0315] Such as Figure 10HAs shown, in the rectangular box, there is one layer in the input part of the function block PF, and the input part is currently displayed up to the first layer. There are three layers in the output part of the function block PF, and the output part is currently displayed up to the first layer. As Figure 10I shown, the operation when expanding the first layer of the output data items of this function block is: logically modify the internal type of the first layer of the output data items to (t1t2)[]t3[], and the XML representation is:
[0316] <type id="" name="" value="" typeclass="1" typevalue="((t1t2)[]t3[])" typeid="">
[0317] <type id="" name="" value="" typeclass="2" typevalue="(t1t2)[]" typeid="">
[0318] <type id="" name="" value="" typeclass="1" typevalue="t1t2" typeid="">
[0319] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t1" typeid="" / >
[0320] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t2" typeid="" / >
[0321]
[0322]
[0323] <type id="" name="" value="" typeclass="2" typevalue="t3[]" typeid="">
[0324] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t3" typeid="">
[0325]
[0326]
[0327] For example, as Figure 10IAs shown, in the rectangular box, the input part of the function block PF is currently displayed to the first layer, and the output part of the function block PF is currently displayed to the second layer.
[0328] As Figure 10J shown, the operation when expanding the output data item of the function block to the second layer is: logically modify the internal type of the second layer of the output data item to t1[]t2[]t3[], and the XML representation is:
[0329] <type id=""name=""value=""typeclass="1"typevalue="((t1[]t2[])t3[])"typeid="">
[0330] <type id=""name=""value=""typeclass="1"typevalue="t1[]t2[]"typeid="">
[0331] <type id=""name=""value=""typeclass="2"typevalue="t1[]"typeid="">
[0332] <type id=""name=""value=""typeclass="0, 1, 2, 3, 4 or 5"typevalue="t1"typeid="">
[0333]
[0334] <type id=""name=""value=""typeclass="2"typevalue="t2[]"typeid="">
[0335] <type id=""name=""value=""typeclass="0, 1, 2, 3, 4 or 5"typevalue="t2"typeid="">
[0336]
[0337]
[0338] <type id=""name=""value=""typeclass="2"typevalue="t3[]"typeid="">
[0339] <type id="" name="" value="" typeclass="0, 1, 2, 3, 4 or 5" typevalue="t3" typeid="" / >
[0340]
[0341]
[0342] For example, as Figure 10J shown, in the rectangular box, the input part of the function block PF is currently displayed to the first layer, and the output part of the function block PF is currently displayed to the third layer.
[0343] For example, converting various expressions of a high-level programming language into basic function blocks (in the XML schema, basic function blocks can be represented as F, and combined function blocks can be represented as PF), and subdividing the basic function blocks according to basic data types, 134 basic function blocks can be formed. In the present disclosure, with a finite number (i.e., 134) of basic function blocks, data items with different data types are attached to the basic function blocks. Thus, when combining, only the connection (line) between algorithms needs to be considered, and there is no need to perform storage design anymore. It should be noted that the data type of the data item of the basic function block is a basic data type or a basic combined data type or a general pointer type or a generic type.
[0344] It should be noted that for basic function blocks, different basic function blocks can be identified using name (without using value). For example, it can be defined that the basic function block with the name value of 0 is expaddI (as will be described later, expaddI represents an addition function block of int type), the basic function block with the name value of 1 is expsubI (as will be described later, expsubI represents a subtraction function block of int type), etc., as long as it is different from the name values of other function blocks in the function block library. In the XML corresponding to each function block, the name value in F / PF represents the relative address of the function block in the function block library, which is globally unique.
[0345] For example, a basic function block is the smallest function block used in the combination function block method. There are multiple options for basic function blocks. You can choose an instruction set of a hardware system to build a basic function block, or you can build a basic function block based on the basic statements of a high-level language. The embodiments of the present disclosure are explained based on the basic statement blocks of a high-level language, including but not limited to a total of 6 major categories, namely, basic function blocks for representing relational expressions, basic function blocks for representing logical expressions, basic function blocks for representing arithmetic expressions, basic function blocks for representing assignment expressions, basic function blocks for representing data type conversion functions, and paradigm basic function blocks. The paradigm basic function blocks include basic function blocks for pointer operations, and the paradigm basic function blocks include the basic function block getname for obtaining the address of a data item. In other words, the multiple basic function blocks in the function block library include basic function blocks for representing relational expressions, basic function blocks for representing logical expressions, basic function blocks for representing arithmetic expressions, basic function blocks for representing assignment expressions, basic function blocks for representing data type conversion functions, and getname. It should be noted that basic function blocks, basic types, etc. include but are not limited to the above-mentioned specific situations.
[0346] Figure 4A A schematic diagram of a graphical representation of an interface of a basic function block provided in some embodiments of the present disclosure, Figure 4B A storage hierarchy diagram of an interface of a basic function block provided for some embodiments of the present disclosure.
[0347] For example, basic function blocks can be represented graphically and in XML.
[0348] For example, the basic function block is represented in the form of an interface. Figure 4A A graphical representation of the interface of a basic function block is shown, such as Figure 4AAs shown, id represents the name of the basic function block, which is defined by the user; the line with an arrow located on the left side of the rectangular box representing the basic function block id represents the input pin of the basic function block, and the solid circle (representing real storage) and hollow circle (representing virtual storage) corresponding to the input pin represent the input data items of the basic function block, i1 represents the i1th input data item of the basic function block, i2 represents the i2th input data item of the basic function block, and so on. All input data items of the input part of the interface of the basic function block are encoded in sequence, and the encoding rule is 0, 1, 2, 3..., that is, for example, i1 can be 0, and i2 can be 1; the line with an arrow located on the right side of the rectangular box representing the basic function block id represents the output pin of the basic function block, and the solid circle (or hollow circle) corresponding to the output pin represents the output data item of the basic function block, j1 represents the j1th output data item of the basic function block, and all output data items of the output part of the interface of the basic function block are encoded in sequence, and the encoding rule is 0, 1, 2, 3..., that is, for example, j1 can be 0. The rectangular box of the basic function block id can be used to annotate the relevant description of the basic function block id, for example, the functions that the basic function block can realize can be annotated. The rectangular box of the basic function block id is also provided with an interface adjustment button. In the process of organizing the basic function block, the interface adjustment button can be clicked as needed to display the storage hierarchy structure diagram of the interface of the basic function block, such as Figure 4B shown.
[0349] In the storage hierarchy structure diagram expressed in graphical form, data items are displayed using a tree-like nested structure, allowing users to have a more intuitive observation of the overall structure of data items. Users can select a data item, for example, click Figure 4B The operation buttons "+" and "-" in the storage hierarchy diagram corresponding to the function block F shown are used to expand and merge the data items in the interface corresponding to the function block F. The number on the left of the id "F" of the function block F in the storage hierarchy diagram is the total number of levels of input data items in the interface corresponding to the function block F, and the number on the right is the total number of levels of output data items in the interface corresponding to the function block F.
[0350] like Figure 4B As shown, in the rectangular box, the first grid in the first row represents the level of the input part (level represents the maximum nested level value of the combination type of the input data items corresponding to the input part), the second grid in the first row represents the ID identifier of the basic function block F, and the third grid in the first row represents the level of the output part (level represents the maximum nested level value of the combination type of the output data items corresponding to the output part).
[0351] The first and third grids in the second row represent the level decrement and increment buttons. By clicking the decrement and increment buttons, you can merge or expand the selected data items. If the selected data item does not contain child data items, that is, the selected data item is a basic data type, a general pointer type, or an array of a basic data type, the selected data item cannot be expanded. If the selected data item has been merged, the merge operation on the selected data item will not work.
[0352] For example, in the graphical expression of the basic function block id, the data items of the input part and the data items of the output part of the interface of the basic function block id are displayed to the second level by default. If the total level of the input part or the output part is 1, it will only be displayed to the first level.
[0353] Figure 4C A schematic diagram of a graphical expression of an interface of an addition function block provided in some embodiments of the present disclosure is provided. FIG4D(1) is a storage hierarchy structure diagram of an interface of an addition function block provided in some embodiments of the present disclosure. FIG4D(2) is another storage hierarchy structure diagram of an interface of an addition function block provided in some embodiments of the present disclosure.
[0354] For example, the XML schema of the interface of the addition function block addI is represented as follows:
[0355] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid=""> -----level1
[0356] <type id="1"name=""value=""typeclass="0"typevalue="int"typeid="" / > -----level2
[0357] <type id="2"name=""value=""typeclass="0"typevalue="int"typeid="" / > -----level2
[0358]
[0359] For example, taking the input part of the interface corresponding to the addition function block addI as an example, the input part includes two levels, namely level1 and level2. The data type of the input data item corresponding to level1 is int2, which represents a data item of a composite data type; the data type of the input data item corresponding to level2 is int and int, which represents two data items of basic data types. As shown in Figure 4D(1), in a current storage hierarchy structure diagram, the input part is currently expanded to level 2, so that the input part of the interface shows two input data items (int and int), and the output part is currently expanded to level 1. When clicking the first '-' sign in the second row of the structure diagram shown in Figure 4D(1), it means that the level of the input part is reduced by 1 level to obtain the structure diagram shown in Figure 4D(2). In the current storage hierarchy structure diagram shown in Figure 4D(2), the input part is currently expanded to level 1. At this time, the input part of the interface only shows one input data item (int2). The current storage hierarchy structure diagram shown in Figure 4D(1) is the default storage hierarchy structure diagram.
[0360] For example, the JSON representation of the addition function block addI is:
[0361]
[0362]
[0363] Among them, children is the subordinate data item of the int2 data item.
[0364] For example, the XML schema of the interface of a basic function block is represented as:
[0365]
[0366] As shown above, the basic function block F has three attributes: id, name, and value. Among them, id represents the name of the basic function block, which is defined by the user; name represents the global address of the basic function block in the function block library, which is defined by the computer according to the rules. The global address is numbered sequentially starting from 0, and name is a number. The function block library is a collection of all function blocks (including basic function blocks and combination function blocks); value represents the operation symbol of the basic function block, such as "+" and "-". The interface of the basic function block F consists of two parts. <in> and< / in> The part between represents the input part, <out> and< / out> The part between represents the output part. The input data items of the input part and the output data items of the output part are the storage attached to the basic function block. The storage is the carrier of the data. <in> and< / in> as well as <out> and< / out> The T in it represents the data type of the data item, which can be a basic data type, a composite data type, a pointer type, or a generic type.
[0367] It should be noted that, in the process of constructing a combined function block, the name of any function block (including basic function blocks and combined function blocks) remains unchanged.
[0368] The JSON representation of the basic function block interface is:
[0369]
[0370]
[0371] For example, the third representation of the interface of a basic function block is:
[0372] <"F","","","">
[0373] <"","","","","",""," / >
[0374] <"","","","","",""," / >
[0375]
[0376] Among them, <"F","","","">, F indicates that the function block is a basic function block, and the following three values respectively represent the id, name, and value attribute values of the function block. The first <"","","","","","","" / > represents the input part of the function block, and the format is the same as the data item. The second <"","","","","","","" / > represents the output part of the function block.
[0377] The following is a brief introduction to various basic function blocks.
[0378] For example, relational expressions are used to implement relational operations, which include equality (==), greater than (>), less than (<), greater than or equal to (>=), less than or equal to (<=), and not equal to (!=). Relational operations are operations on data items of seven basic data types: int, float, double, long, char, byte, and short. The input of a relational expression is always a binary data item (i.e., two input data items), and the output of a relational expression is always a unary boolean data item (i.e., one output data item). Table 1 below shows various relational expressions.
[0379] Table 1
[0380]
[0381] In addition, the disclosed embodiments include two basic pointer-related function blocks: equalref, which determines whether pointer-type data items are equal, and isnull, which determines whether a pointer-type data item is null. isnull has an input data item and an output data item. The input data item has a data type attribute of ref, and the output data item has a data type attribute of boolean.
[0382] Figure 4E A schematic diagram of a graphical expression of a basic function block of a relational expression provided for some embodiments of the present disclosure.
[0383] For example, Figure 4E As shown, the name of the basic function block representing the relational expression is RE. The basic function block RE representing the relational expression has two input data items, idName1 and idName2, and one output data item idName3, which is a boolean type data item. The XML schema of the basic function block RE representing the relational expression is represented as follows:
[0384] <F id="RE"name="">
[0385] <in>
[0386] <type id="" name="" value="" typeclass="1" typevalue="T2" typeid="">
[0387] <type id="idName1" name="" value="" typeclass="0 or 4" typevalue="T" typeid="" / >
[0388] <type id="idName2" name="" value="" typeclass="0 or 4" typevalue="T" typeid="" / >
[0389]
[0390] < / in>
[0391] <out>
[0392] <type id="idName3"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0393] < / out>
[0394] ,
[0395] Among them, the data type attribute of the two input data items idName1 and idName2 is expressed as T, and T can be any one of int, float, double, long, char, byte, and short. The data type attribute of the output data item idName3 is boolean. For example, in some examples, T is int, that is, the data types of the input data items idName1 and idName2 are both integers. At this time, the data type T2 of the combined data item formed by the two input data items idName1 and idName2 is int2. When the basic function block representing the relational expression is encapsulated to form an interface, the two input data items idName1 and idName2 can be combined into a combined data item, and the combined data item is encapsulated as the input part of the interface corresponding to the basic function block representing the relational expression, and the output data item idName3 is encapsulated as the output part of the interface corresponding to the basic function block representing the relational expression.
[0396] For example, referring to the XML structure of the basic function block RE representing the relational expression, the relative address of the input data item idName1 is 0, that is, the relative address of the input data item idName1 in the combined data item obtained by combining the input data items idName1 and idName2 is 0, the relative address of the input data item idName2 is 1, that is, the relative address of the input data item idName2 in the combined data item obtained by combining the input data items idName1 and idName2 is 1, and so on. The relative address of the combined data item obtained by combining the input data items idName1 and idName2 is 0, that is, the relative address of the combined data item obtained by combining the input data items idName1 and idName2 in the input part of the interface corresponding to the basic function block RE representing the relational expression is 0. It should be noted that the relative address attribute of the data item is not represented by name, but is implied by the data structure of the data item and is automatically calculated by the algorithm.
[0397] Figure 4E The JSON representation of the basic function block RE representing the relational expression is as follows:
[0398]
[0399]
[0400] Figure 4F A schematic diagram of a graphical expression of a specific example of a basic function block representing a relational expression provided in some embodiments of the present disclosure, Figure 4G A storage hierarchy diagram of an interface for a basic function block representing a relational expression provided in some embodiments of the present disclosure.
[0401] For example, in one embodiment, Figure 4F shows a graphical representation of a basic function block representing a relational expression of type int. Figure 4G The storage hierarchy structure diagram of the interface of the basic function block of the int type relational expression, for example, the int type relational expression is an int type greater than expression, and the expression form of other data types is similar. Figure 4F As shown, the basic function block representing an int-type relational expression is named moreint. The basic function block moreint, which represents an int-type relational expression, includes two input data items a1 and a2 and one output data item b1. The data type attributes of the input data items a1 and a2 are both int, and the data type attribute of the output data item b1 is boolean. The XML schema of the basic function block moreint is represented as follows:
[0402] <F id="moreint"name="">
[0403] <in>
[0404] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[0405] <type id="a1"name=""value=""typeclass="0"typevalue="int"typeid="" / >
[0406] <type id="a2"name=""value=""typeclass="0"typevalue="int"typeid="" / >
[0407]
[0408] < / in>
[0409] <out>
[0410] <type id="b1"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0411] < / out>
[0412] .
[0413] For example, as shown in the XML above, the input part of the interface corresponding to the basic function block moreint includes two levels, namely level 1 (i.e. int2) and level 2 (i.e. int and int), and the output part of the interface corresponding to the basic function block moreint includes level 1 (i.e. boolean). Therefore, Figure 4G As shown, in the storage hierarchy structure diagram of the interface of the basic function block moreint, the total level of the input part is 2, the total level of the output part is 1, the current display level of the input part is 2, and the current display level of the output part is 1. At this time, the input part shows two input data items a1 and a2, and the output part shows one output data item b1.
[0414] For example, logical expressions are used to implement logical operations, which include the following: && (logical AND expand), || (logical OR expor), and ! (logical NOT expnot). Logical AND and OR are binary logical operations, while logical NOT is a unary logical operation.
[0415] The input of a unary logic operation is a data item whose data type must be boolean. The input of a binary logic operation is a combined data item formed by combining two boolean data items. The output of both a unary logic operation and a binary logic operation is a boolean data item.
[0416] Figure 4H A schematic diagram of a graphical expression of a basic function block of a logical expression provided for some embodiments of the present disclosure.
[0417] For example, Figure 4H As shown, the name of the basic function block representing the logical expression is LE. The basic function block LE representing the logical expression has two input data items, idName4 and idName5, and one output data item idName6. The two input data items idName4 and idName5 and the output data item idName6 are all data items of the boolean type. For example, the XML schema of the basic function block LE representing the logical expression is represented as follows:
[0418] <F id="LE"name="">
[0419] <in>
[0420] <type id=""name=""value=""typeclass="1"typevalue="boolean2"typeid="">
[0421] <type id="idName4"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0422] <type id="idName5"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0423]
[0424] < / in>
[0425] <out>
[0426] <type id="idName6"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0427] < / out>
[0428] ,
[0429] Among them, the data type attribute of the two input data items idName4 and idName5 is boolean, the data type attribute of the combined data item formed by the two input data items idName4 and idName5 is boolean2, and the data type attribute of the output data item idName6 is boolean. When the basic function block representing the logical expression is encapsulated into an interface, the two input data items idName4 and idName5 can be combined into a combined data item, which is encapsulated as the input part of the interface corresponding to the basic function block representing the logical expression, and the output data item idName6 is encapsulated as the output part of the interface corresponding to the basic function block representing the logical expression.
[0430] Figure 4I A schematic diagram of a graphical expression of a specific example of a basic function block of logic and expression provided in some embodiments of the present disclosure, Figure 4J A storage hierarchy diagram of an interface for a basic function block representing logic and expressions provided for some embodiments of the present disclosure.
[0431] For example, in one embodiment, Figure 4I shows a graphical representation of a basic function block representing a logical AND expression of two Boolean data items, Figure 4J This is a storage hierarchy diagram of the interface of the basic function block of logic and expression. Figure 4I As shown, the name of the basic function block representing a logical AND expression is expand. The basic function block expand representing a logical AND expression includes two input data items a3 and a4 and one output data item b2. The data type attributes of the input data items a3 and a4 and the output data item b2 are all boolean. The XML schema of the basic function block expand representing a logical AND expression is represented as follows:
[0432] <F id="expand"name="">
[0433] <in>
[0434] <type id=""name=""value=""typeclass="1"typevalue="boolean2"typeid="">
[0435] <type id="a3"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0436] <type id="a4"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0437]
[0438] < / in>
[0439] <out>
[0440] <type id="b2"name=""value=""typeclass="0"typevalue="boolean"typeid="" / >
[0441] < / out>
[0442] .
[0443] For example, as shown in the XML above, the input part of the interface corresponding to the basic function block expand includes two levels, namely level 1 (i.e., boolean2) and level 2 (i.e., boolean and boolean), and the output part of the interface corresponding to the basic function block expand includes level 1 (i.e., boolean). Therefore, Figure 4J As shown, in the storage hierarchy structure diagram of the interface of the basic function block expand, the total level of the input part is 2, the total level of the output part is 1, the current display level of the input part is 2, and the current display level of the output part is 1. At this time, the input part shows two input data items a3 and a4, and the output part shows one output data item b2.
[0444] For example, arithmetic expressions are used to perform arithmetic operations. There are five arithmetic operations: addition (+), subtraction (-), multiplication (*), division ( / ), and remainder (%). These five arithmetic operations are all binary operations. Arithmetic operations operate on data items of basic data types (i.e., int, float, double, long, byte, and short). Table 2 below shows various arithmetic expressions.
[0445] Table 2
[0446]
[0447] Figure 4K A schematic diagram of a graphical expression of a basic function block of an arithmetic expression provided for some embodiments of the present disclosure.
[0448] For example, Figure 4K As shown, the name of the basic function block representing an arithmetic expression is AE. The basic function block AE representing an arithmetic expression has two input data items, idName7 and idName8, and one output data item idName9. The data type attributes of the two input data items idName7 and idName8 and the output data item idName9 are the same. The XML schema of the basic function block AE representing an arithmetic expression is represented as follows:
[0449] <F id="AE"name="">
[0450] <in>
[0451] <type id=""name=""value=""typeclass="1"typevalue="T2"typeid="">
[0452] <type id="idName7"name=""value=""typeclass="0"typevalue="T"typeid="" / >
[0453] <type id="idName8"name=""value=""typeclass="0"typevalue="T"typeid="" / >
[0454]
[0455] < / in>
[0456] <out>
[0457] <type id="idName9"name=""value=""typeclass="0"typevalue="T"typeid="" / >
[0458] < / out>
[0459] , where the data type attributes of the two input data items idName7 and idName8 are both expressed as T, and T can be any one of int, float, double, long, byte, and short. The data type attribute of the output data item idName9 is also expressed as T. For example, in some examples, T is int, that is, the data type attributes of the input data items idName7 and idName8 and the output data item idName9 are all int type. At this time, the data type attribute T2 of the combined data item formed by the two input data items idName7 and idName8 is int2. When the basic function block AE representing the arithmetic expression is encapsulated into an interface, the two input data items idName7 and idName8 can be combined into a combined data item, which is encapsulated as the input part of the interface corresponding to the basic function block AE representing the arithmetic expression, and the output data item idName9 is encapsulated as the output part of the interface corresponding to the basic function block AE representing the arithmetic expression.
[0460] Figure 4L A schematic diagram of a graphical expression of a basic function block of an addition expression provided in some embodiments of the present disclosure, Figure 4M A storage hierarchical structure diagram of an interface for a basic function block representing an addition expression provided in some embodiments of the present disclosure, Figure 4N Another storage hierarchy diagram of an interface for a basic function block representing an addition expression provided for some embodiments of the present disclosure.
[0461] For example, in one embodiment, the arithmetic expression includes an addition expression, Figure 4L The following figure shows a graphical representation of a basic function block representing an addition expression of type int. Figure 4M and Figure 4N The storage hierarchy structure of the interface of the basic function block of the addition expression of int type is shown. The arithmetic expression of other data types is similar. Figure 4L As shown, the name of the basic function block representing the addition expression is expaddI, and the basic function block expaddI representing the addition expression includes two input data items a5 and a6 and one output data item b3. The data type attributes of the input data items a5 and a6 and the output data item b3 are all int types.
[0462] For example, the XML schema representing the basic function block expaddI of the addition expression is represented as:
[0463] <F id="expaddI"name="">
[0464] <in>
[0465] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[0466] <type id="a5"name=""value=""typeclass="0"typevalue="int"typeid="" / >
[0467] <type id="a6"name=""value=""typeclass="0"typevalue="int"typeid="" / >
[0468]
[0469] < / in>
[0470] <out>
[0471] <type id="b3"name=""value=""typeclass="0"typevalue="int"typeid="" / >
[0472] < / out>
[0473] .
[0474] For example, as shown in the XML above, the input part of the interface corresponding to the basic function block expaddI includes two levels, namely level 1 (i.e., int2) and level 2 (i.e., int and int), and the output part of the interface corresponding to the basic function block expaddI includes level 1 (i.e., int). Therefore, Figure 4M and Figure 4N As shown in the storage hierarchy structure diagram of the interface of the basic function block expaddI, the total level of the input part is 2, and the total level of the output part is 1, as shown in FIG. Figure 4M As shown, the current display level of the input part is 2 (default value), and the current display level of the output part is 1. At this time, the input part shows two input data items a5 and a6 (int and int), and the output part shows one output data item b3, as shown in FIG. Figure 4N As shown, the current display level of the input part is 1, and the current display level of the output part is 1. At this time, the input part shows an input data item (int2), and the output part shows an output data item b3. It should be noted that, Figure 4L The input and output parts shown are the same as Figure 4M The storage hierarchy shown corresponds to the following.
[0475] For example, an assignment expression is used to implement an assignment operation. The assignment expression has an input data item and an output data item, and the data type attribute of the input data item and the data type attribute of the output data item must be consistent and both are basic data types. The assignment operation means assigning the value of the input data item to the value of the output data item.
[0476] The assignment algorithm has corresponding assignment basic function blocks for the 10 basic data types. Table 3 below shows various assignment expressions.
[0477] Table 3
[0478]
[0479] Figure 4O A schematic diagram of a graphical expression of a basic function block of an assignment expression provided for some embodiments of the present disclosure.
[0480] For example, Figure 4OAs shown, the name of the basic function block representing the assignment expression is assignid, and the basic function block assignid representing the assignment expression has an input data item idName10 and an output data item idName11. The data type attribute of the input data item idName10 is the same as the data type attribute of the output data item idName11. The XML schema of the basic function block assignid representing the assignment expression is represented as follows:
[0481] <F id=""name="">
[0482] <in>
[0483] <type id="idName10"name=""value=""typeclass="0 or 4"typevalue="T"typeid="" / >
[0484] < / in>
[0485] <out>
[0486] <type id="idName11"name=""value=""typeclass="0 or 4"typevalue="T"typeid="" / >
[0487] < / out>
[0488] , where the data type attributes of the input data item idName10 and the output data item idName11 are both represented as T, where T can be any of the 10 basic data types. When the basic function block representing the assignment expression is encapsulated into an interface, the input data item idName10 is encapsulated as the input part of the interface corresponding to the basic function block representing the assignment expression, and the output data item idName11 is encapsulated as the output part of the interface corresponding to the basic function block representing the assignment expression.
[0489] Figure 4P A schematic diagram of a graphical expression of a specific example of a basic function block of an assignment expression provided in some embodiments of the present disclosure, Figure 4Q A storage hierarchy diagram of an interface for a basic function block representing an assignment expression provided for some embodiments of the present disclosure.
[0490] For example, in one embodiment, Figure 4P The following figure shows the graphical representation of the basic function block representing the assignment expression of the Char type. Figure 4Q The storage hierarchy structure of the interface of the basic function block representing the assignment expression of the Char type is shown in FIG. The expression of other data types is similar. Figure 4P As shown, the name of the basic function block representing the assignment expression of the Char type is assignchar. The basic function block assignchar representing the assignment expression of the Char type includes an input data item a7 and an output data item b4. The data type attributes of the input data item a7 and the output data item b4 are both of type Char. The XML schema of the basic function block assignchar is represented as follows:
[0491] <F id="assignchar"name="">
[0492] <in>
[0493] <type id="a7"name=""value=""typeclass="0"typevalue="char"typeid="" / >
[0494] < / in>
[0495] <out>
[0496] <type id="b4"name=""value=""typeclass="0"typevalue="char"typeid="" / >
[0497] < / out>
[0498] .
[0499] For example, as shown above, the input part of the interface corresponding to the basic function block assignchar includes 1 level (i.e., char), and the output part of the interface corresponding to the basic function block assignchar includes 1 level (i.e., char). Figure 4Q As shown, in the storage hierarchy structure diagram of the interface of the basic function block assignchar, the total level of the input part is 1, the total level of the output part is 1, the current display level of the input part is 1, and the current display level of the output part is 1. At this time, the input part shows the input data item a7, and the output part shows the output data item b4.
[0500] For example, basic data type conversion includes automatic type conversion, basic type to string conversion and forced type conversion. Table 4 below shows automatic type conversion, Table 5 shows basic type to string conversion, and Table 6 shows forced type conversion.
[0501] Table 4
[0502]
[0503] Form 5
[0504]
[0505] Form 6
[0506]
[0507]
[0508] The data items of the 10 basic data types correspond to different types of basic function blocks, as shown in Table 7 below:
[0509] Form 7
[0510]
[0511] For example, in addition to the five basic function blocks mentioned above, paradigm basic function blocks include getname and addAddress. getname retrieves the address of another data item, whose data type attribute is the pointer type ref. The data type pointed to by the output data item (pointer type) of getname is the same as the type of the input data item. When the input data item type is determined, the type of the data item pointed to by the output data item is also determined. The getname function retrieves the physical address of the actual storage at runtime. Algorithms formed using combinatorial techniques ultimately need to be executed on a computer. Each data item (real storage) appearing in the algorithm is allocated to a hardware storage device at runtime. The allocation and execution process requires the management of hardware storage devices. Assigning an identifier to each hardware storage device is a prerequisite for hardware resource management. The getname function retrieves the identifier of the hardware resource where a data item is located, generally called the physical address. Addition and subtraction of addresses indicate that the hardware storage device addresses are ordered and additive. addAddress performs address addition. The addition axiom defines the concept of order in natural numbers, and address addition also represents the order of addresses. The input data items of addAddress are address / pointer and int types, and the output data items are also address / pointer types. addAddress has constraints on the data type of the data items, which will be explained later. getValueFromAddr retrieves the data item pointed to by an address (pointer type).
[0512] Figure 4R A schematic diagram of a graphical representation of a basic function block of a getname function provided in some embodiments of the present disclosure, Figure 4S A storage hierarchical structure diagram of an interface representing a basic function block of a getname function provided for some embodiments of the present disclosure.
[0513] like Figure 4R As shown, the name of the basic function block representing the getname function is getname, and the basic function block getname has an input data item idName12 and an output data item idName13. The data type attribute of the input data item idName12 can be any type, and the data type attribute of the output data item idName13 is a pointer type ref (if the type of the input data item is uncertain, the output data item is a general pointer type, that is, it can point to a data item of any type).
[0514] The XML schema of the basic function block getname is represented as:
[0515] <F id="getname"name="">
[0516] <in>
[0517] <type id="idName12"name=""value=""typeclass="5"typevalue="*"typeid="*" / >
[0518] < / in>
[0519] <out>
[0520] <type id="idName13"name=""value=""typeclass="4"typevalue="ref"typeid="" / >
[0521] < / out>
[0522]
[0523] When using the getname function for combination, the data type of the input data item can actually be a basic data type, a basic combination data type, an array type, or an XOR type.
[0524] The XML description of the data structure of a pointer with data type x and data type t is as follows:
[0525] <type id=""name=""value=""typeclass="4"typevalue="&t"typeid="ref">
[0526] <type id="a"name=""value=""typeclass="x"typevalue="t"typeid="t" / >
[0527]
[0528] Here, x can be 0, 1, 2, or 3. The specific description of t is determined by the internal data structure of the data item with id a. Please refer to the subsequent typevalue generation rules.
[0529] For example, as shown above, the input part of the interface corresponding to the basic function block getname includes level 1 (ie, data type T), and the output part of the interface corresponding to the basic function block getname includes level 1 (ie, ref). Therefore, Figure 4S As shown, in the storage hierarchy structure diagram of the interface of the basic function block getname, the total level of the input part is 1, the total level of the output part is 1, the current display level of the input part is 1, and the current display level of the output part is 1. At this time, the input part shows the input data item idName12, and the output part shows the output data item idName13.
[0530] It should be noted that, after the input data item of the basic function block getname is connected, the data type of the input data item is determined.
[0531] Expanding a line is different from expanding a graphic view. Expanding a line indicates the preparation of connecting the internal data items of a data item for the purpose of type matching rules; expanding a graphic view allows users to view the internal composition of a data item, and the internal components of a data item will not be transformed. There is no difference in the results between expanding a line and expanding a graphic view for data items of basic composite data types, XOR types, non-universal pointer types, etc. However, there is a difference in the operations of expanding a line and expanding a graphic view on data items of array type. For data items of array type, the array logical equivalent transformation rules are applied when expanding a line, and the data structure of the data item of array type changes. When expanding a graphic view, the array logical equivalent transformation rules are not applied, and the internal structure of the data item of array type is simply viewed. For example, when expanding a data item (intint)[], the user will see that the data item (intint) The data type attribute of the first layer data item of [] is int[]int[], and the second layer data item of the data item (intint)[] is two data items with data type attributes of int[]; when the data item (intint)[] is expanded for graphical viewing, the user will see that the data type attribute of the first layer data item of the data item (intint)[] is (intint)[], and the second layer data item of the data item (intint)[] is a data item with a data type attribute of intint, which indicates that the interior of the data item of the array type is an array formed by multiple data items of intint type. It should be noted that, here, in order to simplify the description, only the line expansion and graphic viewing expansion corresponding to the array type data item are described. It should be noted that all expansion actions in the embodiments of the present disclosure represent line expansion.
[0532] For example, the extensible markup language corresponding to any one of the multiple function blocks includes a calculation sequence part, an interface part, a connection relationship part, and an interface and sequence comparison part.
[0533] The calculation sequence section is used to describe the interfaces of the function blocks included in any function block. In this calculation sequence section, the interface sequence of the function blocks within any function block is arranged in order. The interface section is used to describe the interface of any function block. The connection relationship section is used to describe the data transfer relationship and input merging relationship between the function blocks included in any function block. The interface and sequence comparison section is used to describe the comparison relationship between the data items in the function blocks included in any function block and the data items in the interface of any function block. It also describes the connection relationship between the input data items connected by auxiliary merging lines in any function block. The comparison relationship is reflected by the first relative path and the second relative path of the data items in the interface of any function block.
[0534] It should be noted that, when there is no connection relationship between the data items of any function block, the connection relationship part corresponding to any function block is empty.
[0535] For example, if any function block is a combined function block of a sequential structure, then the XML representation corresponding to the complete structure of any function block is:
[0536] <PF id=""name="">
[0537] <F / PF id=""name="">
[0538] <in>
[0539] < / in>
[0540] <out>
[0541] < / out>
[0542] ...
[0544] <vms>
[0545] Connection Group 1 Connection Group 2......
[0546] < / vms>
[0547] <in>
[0548] < / in>
[0549] <out>
[0550] < / out>
[0551] <pfvms>
[0552] Parameter matching group 1 Parameter matching group 2......
[0553] < / pfvms>
[0554]
[0555] As shown above, the complete structure of the combined function block of the sequence structure (composed of <pf>< / pf> The small function block area (i.e., the calculation sequence part) of the paradigm combination area is used to show at least one small function block, each of which consists of <pf>< / pf> or <f>< / f> Packaged, the interface sequence of each function block inside the combination function block of the sequence structure is arranged in sequence, and the small function block area can include multiple <f pf>< / f> Part, that is, including multiple small function blocks; the combination action area of the paradigm combination area includes the connection relationship part, the connection relationship part of the paradigm combination area (ie VMS), <vms>< / vms> It is used to store the data transfer relationship and input merging relationship between the calculation sequences composed of various function blocks; in the large function interface area (i.e. interface part), the input part of the interface is used <in>< / in> Wrap it up, the output part of the interface is wrapped with <out>< / out>In summary, the large function interface area is used to describe the interface of the combined function block of the sequential structure. The input part and the output part contain their own basic data items or combined data items or generic or pointer data items. The data items are automatically generated by the combined paradigm through the combination rules and follow the description specifications of the data items. The data items of the function block interface are identified by relative paths, which replaces the technical means of using variable names to identify data items in traditional software development. The meaning of data items and function blocks does not depend on variable names, and does not generate data items and algorithms with specific industry characteristics, thereby generating pure abstract algorithms, which essentially achieves a high degree of abstraction and standardization of the algorithm. The relationship area between the large function interface type and the small function interface type (i.e., the interface and sequence comparison part, PFVMS) is used <pfvms>< / pfvms> It is used to describe the comparison relationship between the corresponding data items in the calculation sequence composed of each function block and the data items in the interface of the combined function block, and the connection relationship between the input data items connected by auxiliary merging lines in the calculation sequence composed of each function block.
[0556] The JSON representation of the complete structure of the combined function block of the sequence structure is:
[0557]
[0558] Among them, PFList is the calculation sequence part of the combined function block.
[0559] For example, if any function block is a combination function block of a conditional structure, then the XML representation corresponding to the complete structure of any function block is:
[0560] <PF id=""name="">
[0561] <exp name="">
[0562] <F / PF id=""name="">
[0563] <in>
[0564] < / in>
[0565] <out>
[0566] < / out>
[0567]
[0568]
[0569] <doTrue name="">
[0570] <F / PF id=""name="">
[0571] <in>
[0572] < / in>
[0573] <out>
[0574] < / out>
[0575]
[0576]
[0577] <doFalse name="">
[0578] <F / PF id=""name="">
[0579] <in>
[0580] < / in>
[0581] <out>
[0582] < / out>
[0583]
[0584]
[0585] <vms>
[0586] < / vms>
[0587] <in>
[0588] < / in>
[0589] <out>
[0590] < / out>
[0591] <pfvms>
[0592] < / pfvms>
[0593]
[0594] For example, as shown above, the complete structure of the combination function block of the conditional structure consists of three parts: the paradigm combination area, the large function interface area, and the relationship area between the large function interface type and the small function interface type. The small function block area (i.e., the calculation sequence part) of the paradigm combination area is composed of three parts: the first part, the judgment condition part, consists of <exp>< / exp> In the judgment condition part, each small function block consists of a function block whose output data item is a boolean data type. <pf>< / pf> or <f>< / f> Wrap it up; the second part, the branch structure when the condition is true (the first branch part), is composed of <dotrue>< / dotrue> In the first branch, each small function block consists of <pf>< / pf> or <f>< / f> Wrap it up; the third part, the branch structure when the condition is false (the second branch part), <dofalse>< / dofalse> Wrap up, in the second branch part, each small function block consists of <pf>< / pf> or <f>< / f> Wrap it up; the connection relationship part of the paradigm combination area (ie VMS, combination action area), is composed of <vms>< / vms> It is used to store the data transfer relationship and input merging relationship between the calculation sequences composed of various function blocks; in the large function interface area (i.e. interface part), the input part of the interface is used <in>< / in> Wrap it up, the output part of the interface is wrapped with <out>< / out>The large function interface area is used to describe the interface of the combination function block of the conditional structure; the large function interface type and small function interface type relationship area (i.e., the interface and sequence comparison part, PFVMS) is used <pfvms>< / pfvms> It is used to describe the comparison relationship between the corresponding data items in the calculation sequence composed of each function block and the data items in the interface of the combined function block, and the connection relationship between the input data items connected by auxiliary merging lines in the calculation sequence composed of each function block.
[0595] It should be noted that in the combination function block of the conditional structure, one of the doTrue branch and the doFalse branch can be empty.
[0596] The JSON representation of the complete structure of the combined function block of the conditional structure is:
[0597]
[0598]
[0599] For example, if any function block is a combined function block with a loop structure, then the XML representation corresponding to the complete structure of any function block is:
[0600] <PF id=""name="">
[0601] <exp1 name="">
[0602] <F / PF id=""name="">
[0603] <in>< / in>
[0604] <out>< / out>
[0605]
[0606]
[0607] <loopN name="">
[0608] <IFLoop name="">
[0609] <exp2 name="">
[0610] <F / PF id=""name="">
[0611] <in>< / in>
[0612] <out>< / out>
[0613]
[0614]
[0615] <loop name="">
[0616] <F / PF id=""name="">
[0617] <in>< / in>
[0618] <out>< / out>
[0619]
[0620]
[0621] <exp3 name="">
[0622] <F / PF id=""name="">
[0623] <in>< / in>
[0624] <out>< / out>
[0625]
[0626]
[0627]
[0628]
[0629] <vms>
[0630] < / vms>
[0631] <in>
[0632] < / in>
[0633] <out>
[0634] < / out>
[0635] <pfvms>
[0636] Parameter matching group 1 Parameter matching group 2......
[0637] < / pfvms>
[0638]
[0639] For example, as shown above, the complete structure of the combined function block of the loop structure consists of three parts: the paradigm combination area, the large function interface area, the large function interface type and the small function interface type relationship area. Among them, the small function block area (i.e. the calculation sequence part) of the paradigm combination area is divided into two parts: the first part, the single expression part, consists of <exp1>< / exp1> Wrap it up; the second part, the loop body, consists of <loopn>< / loopn> Packaged, wherein the loop body includes at least one loop portion, <ifloop>< / ifloop> Describe a loop section. The internal structure of each loop section is the same. One loop section is displayed by default. You can add loop sections as needed. In each loop section, <exp2>< / exp2> Part represents the conditional expression, <loop>< / loop> Part represents the middle loop expression, <exp3>< / exp3>The end loop expression part; the combination action area of the paradigm combination area includes the connection relationship part (ie VMS), which is composed of <vms>< / vms> It is used to store the data transfer relationship and input merging relationship between the calculation sequences composed of various function blocks; the input part of the large function interface area is used <in>< / in> Wrap it up and use the output part <out>< / out> Packaged to describe the interface of the combined function block of the loop structure; the relationship area between the large function interface type and the small function interface type (interface and sequence comparison part, i.e. PFVMS), is used <pfvms>< / pfvms> It is used to describe the mapping relationship between the corresponding data items in the calculation sequence composed of each function block and the data items in the interface of the combined function block, and the connection relationship between the input data items connected by the auxiliary merging connection in the calculation sequence composed of each function block. For example, in the XML corresponding to the combined function block of the above loop structure, each small function block is represented by <pf>< / pf> or <f>< / f> wrap up.
[0640] The JSON representation of the complete structure of the combined function block of the loop structure is:
[0641]
[0642]
[0643] For example, if any function block is a combined function block of a while loop structure, then the XML representation corresponding to the complete structure of any function block is:
[0644] <PF id=""name="">
[0645] <loopN name="">
[0646] <IFLoop name="">
[0647]
[0648] For example, as shown above, the complete structure of the combined function block of the when type loop structure consists of three parts: the paradigm combination area, the large function interface area, the large function interface type and the small function interface type relationship area. Among them, the small function block area (i.e. the calculation sequence part) of the paradigm combination area includes: the when type loop body part, which consists of <loopn>< / loopn> Packaged, wherein the when type circulation body includes at least one when type circulation part, <ifloop>< / ifloop> Describes a while loop section, each while loop section consists of <ifloop>< / ifloop> Wrap up, among them, <exp>< / exp> Part represents the when conditional expression, <loop>< / loop>The part represents the while loop expression; when the small function block area of the paradigm combination area includes multiple while loop parts, the internal structures of the multiple while loop parts are the same; the connection relationship part of the paradigm combination area (ie VMS) is composed of <vms>< / vms> It is used to store the data transfer relationship and input merging relationship between the calculation sequences composed of various function blocks; in the large function interface area, the input part of the interface is used <in>< / in> Wrap it up, the output part of the interface is wrapped with <out>< / out> The large function interface area is used to describe the interface of the combined function block of the when type structure; the large function interface type and small function interface type relationship area (interface and sequence comparison part, i.e. PFVMS) is used <pfvms>< / pfvms> It is used to describe the mapping relationship between the corresponding data items in the calculation sequence composed of each function block and the data items in the interface of the combined function block, and the connection relationship between the input data items connected by the auxiliary merging lines in the calculation sequence composed of each function block. For example, in the XML corresponding to the combined function block of the above-mentioned while loop structure, each small function block is represented by <pf>< / pf> or <f>< / f> wrap up.
[0649] For example, in the present disclosure, for any input data item corresponding to any function block of at least two function blocks, any input data item is extracted as part of the interface corresponding to the combined function block. Each input data item corresponds to a first relative path, and the first relative path of each input data item represents the relative path of the input data item in the input portion of the interface corresponding to the combined function block. The relative position of a data item describes the input-output relationship of the data item and does not require a name label, and is specifically represented as a path.
[0650] For example, in some embodiments, the first relative path of any input data item is expressed as follows:
[0651] in.Path(data_in1)(1)
[0652] Among them, in indicates that any input data item is in the input part of the interface corresponding to the combination function block; Path(data_in1) is the relative path of any input data item calculated in the following way: based on the splicing structure of the combination function block (that is, the calculation sequence corresponding to the combination function block), between the outermost input data item corresponding to any input data item in the input part of the interface corresponding to the combination function block to any input data item, the relative address attributes related to any input data item are obtained layer by layer, and the relative path of any input data item is calculated according to the relative address attributes related to any input data item.
[0653] For example, for any output data item corresponding to any function block, any output data item is extracted as part of the interface corresponding to the combined function block, and any output data item corresponds to a first relative path. The first relative path of any output data item represents the relative path of any output data item in the output part of the interface corresponding to the combined function block.
[0654] For example, in some embodiments, the first relative path of any output data item is expressed as follows:
[0655] out.Path(data_out1)(2)
[0656] Among them, out indicates that any output data item is in the output part of the interface corresponding to the combination function block; Path(data_out1) is the relative path of any output data item calculated in the following way: based on the splicing structure of the combination function block, between the outermost output data item corresponding to any output data item in the output part of the interface corresponding to the combination function block to any output data item, the relative address attribute related to any output data item is obtained layer by layer, and the relative path of any output data item is calculated according to the relative address attribute related to any output data item.
[0657] For example, in some embodiments, the relative address attributes associated with any input data item can be connected with a dot symbol (i.e., .) to obtain the relative path of the input data item, that is, the relative path of the input data item in the input part of the corresponding interface of the combination function block where the input data item is located can be obtained in the following manner: according to the nested structure, the relative address attributes of all input data items between the outermost input data item corresponding to the input data item and the input data item (including the outermost input data item and the input data item) are connected with a dot symbol. Similarly, the relative address attributes associated with any output data item can be connected with a dot symbol (i.e., .) to obtain the relative path of the output data item, that is, the relative path of the output data item in the output part of the corresponding interface of the combination function block where the output data item is located can be obtained in the following manner: according to the nested structure, the relative address attributes of all output data items between the outermost output data item corresponding to the output data item and the output data item (including the outermost output data item and the output data item) are connected with a dot symbol. The specific calculation process of Path(data_in1) and Path(data_out1) can refer to the data item positioning process described below.
[0658] It should be noted that in the XML schema, the first relative path of any data item (input or output) is reflected in the PFVMS corresponding to the combined function block corresponding to that data item. The corresponding first relative path is only calculated for data items that are extracted as part of the interface corresponding to the combined function block.
[0659] For example, in some embodiments, in the XML architecture of PFVMS corresponding to the combined function block, the path attribute of the source tag inside the line tag (see the description of PFVMS later) can be used to store the first relative path of any input data item, and the path attribute of the source tag inside the line tag (see the description of PFVMS later) can be used to store the first relative path of any output data item.
[0660] When connecting at least part of the input data items and / or at least part of the output data items of at least two function blocks, the data type attributes of the two connected data items satisfy the type matching rule or the two connected data items satisfy the connection requirement rule, and the type matching rule is that the data type attributes of the two data items match.
[0661] For example, the wiring requirement rule includes that the data type attribute of one of the two data items is a generic type, and the other of the two data items is a basic data type, a composite data type, or a generic type, that is, the other of the two data items is any data type except a pointer type, or the wiring requirement rule includes that the data type attribute of one of the two data items is a generic pointer type, and the data type attribute of the other of the two data items is a non-generic pointer type.
[0662] For example, a type matching rule includes matching the data type attributes of two data items. Matching the data type attributes of two data items can indicate that the data type attributes of the two data items are identical. The identical data type attributes of two data items indicate that the data type attributes of the two data items are the same basic data type, the same composite data type, or the same pointer type. Matching the data type attributes of two data items can also indicate that the data type attribute of one of the two data items is generic, while the data type attribute of the other of the two data items is a data type other than a pointer type. In this case, the two data items satisfy the type matching rule or wiring requirement.
[0663] For example, in the present disclosure, the data type attributes of data items of composite data types and data items of pointer types may not be empty. When the data type attributes are not empty, it is possible to directly determine whether the two data items satisfy the type matching rules based on the data type attributes of the two data items. When the values of the data type attributes of the two data items are the same, the two data items are determined to be two data items that satisfy the type matching rules.
[0664] For example, in the present disclosure, the data type attribute of a composite data type or a pointer data item can be empty. When the data type attribute of a composite data type or a pointer data item is empty, the steps for determining whether the data type attributes of the two data items match are as follows. Furthermore, for data items of primitive data types or generic data items, the steps for determining whether the data type attributes of the two data items match are also as follows.
[0665] For example, determining two data items that satisfy a type matching rule includes: for at least part of the output data items and / or at least part of the input data items, determining whether a data category attribute of the first data item and a data category attribute of the second data item are the same; in response to the data category attribute of the first data item and the data category attribute of the second data item being the same, determining whether the data category attribute of the first data item and the data category attribute of the second data item are basic data types, combined data types, pointer types, or generics; in response to the data category attribute of the first data item and the data category attribute of the second data item being both basic data types, determining whether the data type attribute of the first data item and the data type attribute of the second data item are the same; in response to the data type attribute of the first data item and the data type attribute of the second data item being the same, determining that the first data item and the second data item are two data items that satisfy the type matching rule.
[0666] For example, the combined data type includes a basic combined data type, an XOR type, and an array type, and determining two data items that satisfy the type matching rule also includes: in response to the data category attribute of the first data item and the data category attribute of the second data item being both a combined data type, judging whether the data category attribute of the first data item and the data category attribute of the second data item are an XOR type, a basic combined data type, or an array type; in response to the data category attribute of the first data item and the data category attribute of the second data item being both an XOR type, cyclically judging the type matching rule for the data items at the same position of the first data item and the second data item to obtain multiple XOR judgment results; in response to each of the multiple XOR judgment results indicating that the type matching rule is satisfied, determining that the first data item and the second data item are two data items that satisfy the type matching rule.
[0667] For example, determining two data items that satisfy the type matching rule also includes: in response to the data category attribute of the first data item and the data category attribute of the second data item being array types, loopingly judging whether the data items at the same position of the first data item and the second data item satisfy the type matching rule to obtain at least one array judgment result, and in response to each of the at least one array judgment result indicating that the type matching rule is satisfied, determining that the first data item and the second data item are two data items that satisfy the type matching rule.
[0668] For example, determining two data items that satisfy the type matching rule also includes: in response to the data category attribute of the first data item and the data category attribute of the second data item being both basic combination data types, cyclically judging whether the data items at the same position of the first data item and the second data item satisfy the type matching rule to obtain at least one basic combination judgment result; in response to each of the at least one basic combination judgment results indicating that the type matching rule is satisfied, determining that the first data item and the second data item are two data items that satisfy the type matching rule.
[0669] For example, determining two data items that satisfy the type matching rule also includes: in response to the data category attribute of the first data item and the data category attribute of the second data item being both pointer types, if the first data item and the second data item are both universal pointer types, determining that the first data item and the second data item are two data items that satisfy the type matching rule; if the first data item and the second data item are both non-universal pointer types, cyclically judging whether the data items at the same position of the first data item and the second data item satisfy the type matching rule to obtain at least one non-universal pointer judgment result, and in response to each of the at least one non-universal pointer judgment results indicating that the type matching rule is satisfied, determining that the first data item and the second data item are two data items that satisfy the type matching rule.
[0670] For example, determining two data items that satisfy the type matching rule also includes: in response to the data category attribute of the first data item and the data category attribute of the second data item being generic, determining that the first data item and the second data item are two data items that satisfy the type matching rule.
[0671] The following examples illustrate the type matching rules in detail.
[0672] In the type matching rules, the same data type attributes of two data items may include the same basic type, the same composite type, the same pointer type, and the same generic type.
[0673] For example, "same basic type" means that both data items are of the same basic data type (i.e., the nine basic data types: byte, short, int, long, float, double, boolean, char, string), and their specific data types are the same. For example, if the data types of two data items are the basic data types t1 and t2 (t1 and t2 are one of the nine basic data types), and if t1 = t2, the two data items meet the requirements of the type matching rule. For example, multiple data items of type int are data items of the same data type.
[0674] For example, the same composite type means that both data items are composite data types and have the same specific data type. For example, if the data types of two data items are composite data types T1 and T2, respectively, the two data items meet the requirements of the type matching rule when any corresponding data types within T1 and T2 are equal and the typeclass of any corresponding data types are also the same. For example, if T1 is represented as t1t2 and if T2 is represented as t3t4, then the two data items meet the requirements of the type matching rule when t1 and t3 are the same and t2 and t4 are the same.
[0675] For example, the same pointer type means that both data items are of general pointer type, or both data items are of non-general pointer type and the data types of the specific data items they point to are the same. For example, the data type attribute of two data items is non-general pointer type, and the data types of the two data items are respectively expressed as &T1 and &T2. When the data types of any two corresponding internal data items in &T1 and &T2 are equal, and the typeclass of the data types of any two corresponding internal data items are also the same, the two data items meet the requirements of the type matching rule. For example, if T1 is expressed as t1t2, and if T2 is expressed as t3t4, then when t1 and t3 are the same, and t2 and t4 are the same, the two data items meet the requirements of the type matching rule.
[0676] For any two data items T1 and T2:
[0677] Step 1. Assume that the data type attribute of data item T1 is type1, the category (typeclass) of the data type of data item T1 is class1, the data type attribute of data item T2 is type2, and the category of the data type of data item T2 is class2.
[0678] Step 2: Determine whether the data type category class1 of data item T1 is equal to the data type category class2 of data item T2 (ie, determine whether class1 == class2). If they are equal, execute step 3; if not, execute step 16.
[0679] Step 3: Determine whether data item T1 and data item T2 are data items of basic data types (ie, determine whether class1 and class2 are 0). If so, execute step 4; if not, execute step 5.
[0680] Step 4: Type matching judgment of basic data types, which includes the following two steps 4.1-4.2:
[0681] Step 4.1: Determine whether the data type attributes of the two data items T1 and T2 are the same. If they are the same, execute step 4.2; if they are different, execute step 16.
[0682] Step 4.2: Determine whether data item T1 and data item T2 meet the type matching rule, and proceed to step 15.
[0683] Step 5: Determine whether the data type category class1 of the data item T1 and the data type category class2 of the data item T2 are of an exclusive OR type. If so, execute step 6; if not, execute step 7.
[0684] Step 6: XOR type matching judgment, which includes the following five steps 6.1 to 6.5:
[0685] Step 6.1, assume that the type value of the XOR type data item T1 is t1xort2, and the type value of the XOR type data item T2 is t3xort4;
[0686] Step 6.2: Check the data type matching between data item t1 and data item t3, recursively jump to step 1, and record the returned result r1;
[0687] Step 6.3: Check the data type matching between data item t2 and data item t4, recursively jump to step 1, and record the returned result r2;
[0688] Step 6.4: Determine whether r1 and r2 are both true (r1 / r2 being true indicates that the data types of the two data items being determined (data items t1 and t3 / data items t2 and t4) match successfully). If so, proceed to step 6.5; if not, proceed to step 16.
[0689] Step 6.5: Determine that data item T1 and data item T2 satisfy the type matching rule of the XOR type, and proceed to step 15.
[0690] Step 7: Determine whether the data type category class1 of the data item T1 and the data type category class2 of the data item T2 are array types. If so, execute step 8; if not, execute step 9.
[0691] Step 8: Array type type matching judgment, which includes the following four steps 8.1 to 8.4:
[0692] Step 8.1, assume that the type value of the internal data item t1 of the array type data item T1 is d1d2d3..., and the type value of the internal data item t2 of the array type data item T2 is d4d5d6...;
[0693] Step 8.2: Check the data type matching between data item t1 and data item t2, recursively jump to step 1, and record the returned result;
[0694] Step 8.3: Determine whether all the results returned in 8.2 are true. If so, proceed to step 8.4; if not, proceed to step 16.
[0695] Step 8.4: Determine whether data item T1 and data item T2 meet the type matching rule of the array type, and proceed to step 15.
[0696] Step 9: Determine whether the data type category class1 of the data item T1 and the data type category class2 of the data item T2 are basic combined data types. If so, execute step 10; if not, execute step 11.
[0697] Step 10: Type matching judgment of basic composite data types, which includes the following four steps 10.1 to 10.4:
[0698] Step 10.1, assuming that the type value of the data item T1 of the composite data type is h1h2h3..., and the type value of the data item T2 of the composite data type is h4h5h6...;
[0699] Step 10.2: Loop to determine whether the data types of the data items at the same position (for example, h1 in data item T1 and h4 in data item T2 are two data items at the same position) match, recursively jump to step 1, and record the returned result;
[0700] Step 10.3: Determine whether all the results returned in step 10.2 are true. If so, proceed to step 10.4; if not, proceed to step 16.
[0701] Step 10.4: Determine that data item T1 and data item T2 meet the type matching rule of the combination type, and proceed to step 15.
[0702] Step 11: Determine whether the data type category class1 of the data item T1 and the data type category class2 of the data item T2 are pointer types. If so, execute step 12; if not, execute step 13.
[0703] Step 12: Type matching judgment of pointer type, which includes the following four steps 12.1 to 12.5:
[0704] Step 12.1, assuming that the type value of pointer-type data item T1 is ref and the type value of pointer-type data item T2 is ref, determine that data item T1 and data item T2 meet the type matching rule of the combination type, and then proceed to step 15;
[0705] Step 12.2: Assume that the type value of pointer-type data item T1 is &h1h2h3..., and the type value of pointer-type data item T2 is &h4h5h6...;
[0706] Step 12.3: Loop to determine whether the data types of the data items at the same position (for example, h1 in data item T1 and h4 in data item T2 are two data items at the same position) match, recursively jump to step 1, and record the return result;
[0707] Step 12.4: Determine whether all the results returned in 12.3 are true. If so, proceed to step 12.5; if not, proceed to step 16.
[0708] Step 12.5: Determine whether data item T1 and data item T2 meet the type matching rule of pointer type, and proceed to step 15.
[0709] Step 13: Determine whether the data type category class1 of the data item T1 and the data type category class2 of the data item T2 are generic. If so, execute step 14; if not, execute step 16.
[0710] Step 14: Generic type matching judgment: If the data type attributes of the two data items are generic, it is determined that data item T1 and data item T2 meet the type matching rule, and step 15 is executed.
[0711] Step 15: Determine whether the data type attributes of data item T1 and data item T2 meet the type matching rule, that is, data item T1 and data item T2 are matched successfully, and the matching result flag=true.
[0712] Step 16: Determine that the data type attributes of data item T1 and data item T2 do not satisfy the type matching rule, that is, data item T1 and data item T2 fail to match, and the matching result flag=false.
[0713] Step 17: Return the matching result flag.
[0714] For example, if data item T1 and data item T2 are both data items of basic data types, then class1 and class2 are both 0. If the data type attributes of the two data items are type1 and type2 respectively, when type1 and type2 are the same, for example, type1 and type2 are both int, then the data type attribute of the data item T1 of the basic data type is the same as the data type attribute of the data item T2 of the basic data type.
[0715] For example, if data item T1 and data item T2 are both data items of composite data type, if class1 and class2 are both 3, then data item T1 and data item T2 are both data items of XOR type. At this time, the XOR type type matching judgment (i.e., step 6 above) can be performed. For example, if the type value of data item T1 is t1xort2, and the type value of data item T2 is t3xort4, if the data type attribute of data item t1 is the same as the data type attribute of data item t3, and the data type attribute of data item t2 is the same as the data type attribute of data item t4, for example, data item t1 and data item t3 are both data items of int type, and data item t2 and data item t4 are also both data items of int type. At this time, the data type attribute of XOR type data item T1 is the same as the data type attribute of XOR type data item T2.
[0716] To judge the type matching rule of two data items of array type, it is necessary to compare whether the data types of the data items t1 and t2 contained in the two data items of array type match. t1 and t2 may be basic data types, basic composite data types, XOR types, array types, pointer types or generics. The comparison of t1 and t2 needs to recursively return to step 1 for comparison. For example, if class1 and class2 are both 2, then data item T1 and data item T2 are both data items of array type. At this time, the type matching judgment of the array type can be performed (i.e., the above step 8). For example, data item T1 includes data item t1, and data item T2 includes data item t2. Then, the data type matching judgment of data item t1 and data item t2 is performed (return to step 1). For the specific process, please refer to the specific description of each step. For example, in some examples, if data item t1 and data item t2 are both data items of basic data types, step 4 is executed to determine whether the data type attributes of the two data items t1 and data item t2 are the same. If they are the same, it is determined that data item t1 and data item t2 meet the type matching rule, thereby determining that the data type attribute of array type data item T1 and the data type attribute of array type data item T2 are the same; in other examples, if data item t1 and data item t2 are both data items of basic composite data types, the type value of data item t1 is d1d2d3..., and the type value of data item t2 is d4d5d6..., then step 10 is executed. For example, if data item d The data type attribute of data item 1 is the same as the data type attribute of data item d4, the data type attribute of data item d2 is the same as the data type attribute of data item d5, and the data type attribute of data item d3 is the same as the data type attribute of data item d6. For example, the data type attribute of data item d1 and data item d4 is both (int2), the data type attribute of data item d2 and data item d3 is both int, and the data type attribute of data item d3 and data item d6 is both long. At this time, data item t1 and data item t2 meet the type matching rule, thereby determining that the data type attribute of array type data item T1 is the same as the data type attribute of array type data item T2, and so on.
[0717] If class1 and class2 are both 1, then data item T1 and data item T2 are both data items of the basic combined data type. At this time, the type matching judgment of the basic combined data type (i.e., step 10 above) can be performed. For example, if the type value of data item T1 is h1h2h3, and the type value of data item T2 is h4h5h6, if the data type attribute of data item h1 is the same as the data type attribute of data item h4, the data type attribute of data item h2 is the same as the data type attribute of data item h5, and the data type attribute of data item h3 is the same as the data type attribute of data item h6, for example, the data type attributes of data item h1 and data item h4 are both (int2), the data type attributes of data item h2 and data item h3 are both int, and the data type attributes of data item h3 and data item h6 are both long, at this time, the data type attribute of combined type data item T1 is the same as the data type attribute of combined type data item T2.
[0718] For example, if class1 and class2 are both 4, then data item T1 and data item T2 are both pointer type data items. At this time, the pointer type type matching judgment (i.e., step 12 above) can be performed. The data type attributes of data item T1 and data item T2 are the same if and only if the data type attribute of the data item (basic data type or composite data type) stored at the address pointed to by data item T1 is the same as the data type attribute of the data item (basic data type or composite data type) stored at the address pointed to by data item T2, or if data item T1 and data item T2 do not point to any data item.
[0719] For example, if class1 and class2 are both 5, then data item T1 and data item T2 are both generic data items. At this time, the generic type matching judgment (i.e., step 14 above) can be performed. When the data type attributes of data item T1 and data item T2 are both generic, the data item T1 and data item T2 meet the type matching rules.
[0720] For any two data items T1 and T2, the data type attributes of the two data items T1 and T2 satisfy the type matching rule or the two data items T1 and T2 satisfy the connection requirement rule. For example, the concatenation operation (connection action) of the two data items T1 and T2 is as follows:
[0721] Step 1: Apply the type matching rule to the two data items T1 and T2. If the match is successful, proceed to step 6. If the match is unsuccessful, proceed to step 2.
[0722] Step 2: If the data type attribute of one of the two data items T1 and T2 is generic, and the other data item of the two data items T1 and T2 is any data type except a pointer type, determine that the two data items meet the wiring requirement rules, and execute step 6;
[0723] Step 3: If the data type attribute of one of the two data items T1 and T2 is a generic pointer type, and the other of the two data items T1 and T2 is a non-generic pointer type, determine that the two data items meet the connection requirement rules, and execute step 6;
[0724] Step 4: If the type matching between the two data items T1 and T2 fails in step 1, the two data items T1 and T2 do not meet the connection requirement rules in steps 2 and 3, and the two data items T1 and T2 are both data items of the composite data type, you can try to expand the two data items T1 and T2;
[0725] Step 5: The expanded data items and internal data items return to execute step 1;
[0726] Step 6: If the types of the two data items T1 and T2 in step 1 match successfully, or the two data items in steps 2 and 3 meet the connection requirement rules, the connection action can be applied to the two data items T1 and T2.
[0727] It should be noted that in the embodiments of the present disclosure, when performing a splicing operation, when two data items meet any one of the type matching rules and the connection requirement rules, a connection action can be applied to the two data items, that is, if the two data items do not meet the type matching rules but meet the connection requirement rules, a connection action can be applied to the two data items.
[0728] For example, at least some of the input data items include the first part of the input data items. In step S11, in a splicing operation, at least some of the input data items and / or at least some of the output data items of at least two function blocks are connected, including: based on a type matching rule and / or a connection requirement rule, connecting at least some of the output data items and the first part of the input data items via a data transfer connection. The result of the connection operation is equivalent to a storage merge, indicating that the two data items (i.e., storage) connected by the connection are merged into one data item.
[0729] For example, the data type properties of the two data items connected by a data transfer line meet the type matching rules or the two connected data items meet the connection requirement rules. The type matching rules or connection requirement rules are prerequisites that must be followed for the connection operation. The data items connected by a data transfer line must meet the type matching rules or connection requirement rules for the connection to be successful.
[0730] For example, data transfer wiring rules must be followed throughout the function block organization process. These rules include: If the data type attributes of two data items satisfy the type matching rules, then the two data items can be wired. Furthermore, a practical wiring rule has been added to the function block organization process for both technical and practical considerations. This practical wiring rule includes: If the data type attributes of two input data items satisfy the type matching rules, then the two input data items can be wired together using an auxiliary merge.
[0731] For example, a data transfer line represents a line connecting an output data item to an input data item or an output data item. Data transfer lines include output-output transfer lines and output-input transfer lines. An output-output transfer line is used to connect at least two output data items, and an output-input transfer line is used to connect at least one output data item to at least one input data item. Both output-output transfer lines and output-input transfer lines are lines emanating from output data items. Data transfer lines are directional lines. For example, in a graphical representation, a line with an arrow may be used to represent a data transfer line.
[0732] For example, at least part of the output data items includes a first output data item, a second output data item, and a third output data item, and the first part of the input data items includes the first input data item.
[0733] In the splicing operation, connecting at least part of the output data items and the first part of the input data items through the data transfer line includes at least one of the following: connecting the second output data item to the first output data item through the output-output transfer line, the second output data item appears after the first output data item, setting the storage type attribute of the second output data item to virtual storage, without changing the storage type attribute of the first output data item, recording the connection relationship between the first output data item and the second output data item, the function block where the second output data item is located is calculated after the function block where the first output data item is located, and the calculated value of the second output data item is passed to the first output data item; connecting the third output data item to the first input data item through the output-input transfer line; in response to the third output data item appearing after the first input data item or the third output data item and the first input data item belonging to the same function In a block, the storage type attribute of the third output data item is set to virtual storage, the storage type attribute of the first input data item is not changed, the connection relationship between the first input data item and the third output data item is recorded, the function block where the third output data item is located performs calculations after the function block where the first input data item is located, and the calculated value of the third output data item is passed to the first input data item; in response to the third output data item appearing before the first input data item, the storage type attribute of the first input data item is set to virtual storage, the storage type attribute of the third output data item is not changed, the connection relationship between the first input data item and the third output data item is recorded, the function block where the third output data item is located performs calculations before the function block where the first input data item is located, and the calculated value of the third output data item is passed to the first input data item as input data for the function block where the first input data item is located. The splicing and connecting operation is performed by the user, and whether the storage type attribute is set to virtual storage can be automatically realized by the visualization tool according to the above rules, simplifying the user operation steps.
[0734] For example, the first output data item, the second output data item, the third output data item and the first input data item are positioned in the form of a second relative path, the connection relationship between the first output data item and the second output data item is reflected by the second relative path of the first output data item and the second output data item, and is recorded in the connection relationship part of the selected combination paradigm, and the connection relationship between the first input data item and the third output data item is reflected by the second relative path of the first input data item and the third output data item.
[0735] For example, at least some of the input data items further include a second part of the input data items.
[0736] For example, in step S11, in the splicing operation, connecting at least part of the input data items and / or at least part of the output data items of at least two function blocks also includes: connecting the second part of the input data items through auxiliary merging lines based on type matching rules and / or connection requirement rules.
[0737] For example, the second part of the input data items includes the second input data item and the third input data item. Connecting the second part of the input data items through the auxiliary merge line includes: connecting the third input data item to the second input data item through the auxiliary merge line, setting the storage type attribute of the third input data item to virtual storage, not changing the storage type attribute of the second input data item, and recording the connection relationship between the second input data item and the third input data item.
[0738] For example, the second input data item and the third input data item are positioned in the form of a second relative path, and the connection relationship between the second input data item and the third input data item is reflected by the second relative path of the second input data item and the third input data item, and is recorded in the interface and sequence comparison part of the selected combination paradigm.
[0739] For example, for any input data item in the interface corresponding to any function block of at least two function blocks, any input data item corresponds to a second relative path. The second relative path of any input data item represents the relative path of any input data item in the combined function block. The second relative path of any input data item is expressed as:
[0740] Path(PF).in.Path(data_in2)(3)
[0741] Among them, Path(PF) is the relative path of any function block to which any input data item belongs in the combined function block calculated in the following manner: based on the splicing structure of the combined function block (that is, the calculation sequence corresponding to the combined function block, which stipulates that the function blocks are sequentially built-in with relative address codes in the calculation sequence, and the coding rules are coded as 0, 1, 2...), from the outermost function block corresponding to any function block of the combined function block to any function block, the relative address attributes related to any function block are obtained layer by layer, and the relative path of any function block is calculated based on the relative address attributes related to any function block; in represents that any input data item is in the input part of the interface corresponding to any function block, Path(data_in2) is the relative path of any input data item in the input part of the interface corresponding to any function block calculated in the following manner: from the outermost input data item corresponding to any input data item of the input part of the interface corresponding to any function block to any input data item, the relative address attributes related to any input data item are obtained layer by layer, and the relative path of any input data item is calculated based on the relative address attributes related to any input data item.
[0742] For example, for any output data item in the interface corresponding to any function block, any output data item corresponds to a second relative path. The second relative path of any output data item represents the relative path of any output data item in the combined function block. The second relative path of any output data item is expressed as:
[0743] Path(PF).out.Path(data_out2)(4)
[0744] Among them, Path(PF) represents the relative path of any function block to which any output data item belongs in the combined function block: out represents that any output data item is in the output part of the interface corresponding to any function block, and Path(data_out2) is the relative path of any output data item in the output part of the interface corresponding to any function block calculated in the following way: between the outermost output data item corresponding to any output data item in the output part of the interface corresponding to any function block to any output data item, the relative address attribute related to any output data item is obtained layer by layer, and the relative path of any output data item is calculated based on the relative address attribute related to any output data item.
[0745] For example, in some embodiments, the relative address attributes related to any function block can be connected with a dot symbol (i.e., .) to obtain the relative path of the any function block in the combined function block obtained by combining the any function block, that is, the relative path of the function block in the combined function block composed of the function blocks can be obtained in the following way: according to the nested structure, the relative address attributes of all function blocks (including the outermost function block and the any function block) from the outermost function block of the combined function block corresponding to the any function block to any function block are connected with a dot symbol. Similarly, the relative path of an input data item in the input portion of the interface corresponding to the function block where the input data item is located can be obtained by connecting the relative address attributes of all input data items between the outermost input data item corresponding to the input data item and the input data item according to the nested structure with dot symbols; the relative path of an output data item in the output portion of the interface corresponding to the function block where the output data item is located can be obtained by connecting the relative address attributes of all output data items (including the outermost output data item and the output data item) between the outermost output data item corresponding to the output data item and the output data item according to the nested structure with dot symbols. The specific calculation process of Path(data_in2) and Path(data_out2) can refer to the data item positioning process described below.
[0746] It should be noted that, in the XML architecture, the second relative path of any data item (input data item or output data item) is reflected in the PFVMS and VMS corresponding to the combined function block corresponding to the any data item.
[0747] For example, in some embodiments, in the XML architecture of PFVMS / VMS corresponding to the combined function block, the path attribute inside the destination tag inside the line tag in PFVMS, the source tag inside the line tag in VMS, or the path attribute inside the destination tag can be used to store the second relative path of any input data item or to store the second relative path of any output data item.
[0748] For example, after organizing the calculation sequences corresponding to at least two function blocks, the internal data items of the at least two function blocks are connected according to the connection rules, thereby generating the VMS part corresponding to the combined function block.
[0749] For example, in XML, the data transfer connection relationship in the calculation sequence is stored in the VMS corresponding to the combination function block in the form of a second relative path. The calculation formula for the second relative path of the data item in the calculation sequence refers to (3) and (4) above. The connection relationship of the auxiliary merge connection in the calculation sequence is temporarily stored in the VMS in the form of a second relative path. The calculation formula for the second relative path of the data item in the calculation sequence also refers to (3) and (4) above. After the interface is generated, the relationship of the auxiliary merge connection will be stored in the PFVMS area, and the relationship record of the auxiliary merge connection in the VMS area will be deleted.
[0750] For example, in some embodiments, the XML representation of VMS is:
[0751]
[0752] In the above-mentioned VMS XML, the VMS XML is used to record the relationship between data transfer connections, that is, to store the directional connections issued by the output data items. Each connection is stored using a set of line tags. The line tag consists of source and destination tags. The path attribute of the source tag stores the second relative path of the data item where the starting point of the directed line segment is located in the calculation sequence, and the path attribute of the destination tag stores the second relative path of the data item where the end point of the directed line segment is located in the calculation sequence. The memory (not shown) attribute represents the storage type attribute of the data item where the starting point or end point is located. Memory = 0 indicates that the storage type attribute of the data item is virtual storage, and memory = 1 indicates that the storage type attribute of the data item is real storage. The storage type modification occurs in the memory attribute of the data item where the two endpoints of the directed line segment are located. It should be noted that the storage type attribute of any data item is real storage by default, and is changed during the connection process according to the connection rules (data transfer connection rules and practical connection rules).
[0753] The JSON representation of VMS is:
[0754]
[0755] For example, the undirected attribute is used to distinguish the type of connection relationship. The absence of the undirected attribute indicates a record data transfer connection, which stores a directed connection issued by an output data item. The presence of the undirected attribute indicates a temporary auxiliary merge connection, which stores an undirected connection between input data items.
[0756] For example, the XML representation of the VMS corresponding to the data transfer connection is:
[0757] <vms>
[0758] < / vms>
[0759] For example, the XML representation of the VMS corresponding to the auxiliary merge line is:
[0760] <VMS undirected="">
[0761]
[0762] For example, in some examples, recording the connection relationship between the first output data item and the second output data item may include: in a graphical expression, connecting the second output data item to the first output data item using an output-output transfer line, with the arrow of the output-output transfer line pointing to the first output data item; in the XML expression of the VMS of the combined function block, storing the second relative path of the second output data item through the path attribute of the source tag, and storing the second relative path of the first output data item through the path attribute of the destination tag.
[0763] For example, in some examples, recording the connection relationship between the first input data item and the third output data item may include: in a graphical expression, connecting the third output data item to the first input data item using an output-input transfer line, with the arrow of the output-input transfer line pointing to the first input data item; in the XML expression of the VMS of the combined function block, storing the second relative path of the third output data item through the path attribute of the source tag, and storing the second relative path of the first input data item through the path attribute of the destination tag.
[0764] For example, in some examples, recording the connection relationship between the second input data item and the third input data item includes: in a graphical expression, connecting the second input data item and the third input data item using an auxiliary merge line without an arrow. As for the relationship of the auxiliary merge lines, during the organization process of the function block, the relationship of the auxiliary merge lines is temporarily stored in a VMS area with the attribute undirected="". After the interface is formed, it is updated in the PFVMS, and the part corresponding to the relationship of the auxiliary merge lines in the VMS is deleted, that is, the part with the attribute undirected="". The connection relationship between the second input data item and the third input data item can be temporarily stored in the XML expression of the VMS of the combined function block, for example, the second relative path of the second input data item is stored through the path attribute of the source tag, and the second relative path of the third input data item is stored through the path attribute of the destination tag. Alternatively, the second relative path of the third input data item is stored through the path attribute of the source tag, and the second relative path of the second input data item is stored through the path attribute of the destination tag.
[0765] For example, in a graphical expression, setting the storage type attribute of a data item to virtual storage means setting the circle representing the data item to a hollow circle, and setting the storage type attribute of a data item to real storage means setting the circle representing the data item to a solid circle; in an XML expression of a combination function block, setting the storage type attribute of a data item to virtual storage means setting the value of memory representing the data item to 0, and setting the storage type attribute of a data item to real storage means setting the value of memory representing the data item to 1. For example, for a first output data item and a second output data item, setting the storage type attribute of the second output data item to virtual storage without changing the storage type attribute of the first output data item includes: in a graphical expression, setting the circle representing the second output data item to a hollow circle and keeping the circle representing the first output data item unchanged; in an XML expression of a combination function block, setting the value of the storage type attribute memory of the second output data item to 0 and keeping the value of the storage type attribute memory of the first output data item unchanged. That is to say, if in the graphical expression form, the circle representing the first output data item is a solid circle, and in the XML expression form of the combination function block, the value of the storage type attribute memory of the first output data item is 1, then after the first output data item is connected, the circle representing the first output data item is still a solid circle, and the value of the storage type attribute memory of the first output data item is still 1.
[0766] Figure 5A A schematic diagram of an output transfer line provided in one embodiment of the present disclosure.
[0767] For example, Figure 5A As shown, a combined function block includes function block F1 / PF1 and function block F2 / PF2. According to the calculation order, function block F1 / PF1 is located before function block F2 / PF2. Function block F1 / PF1 includes output data item b5 (for example, the first output data item mentioned above), and function block F2 / PF2 includes output data item b6 (for example, the second output data item mentioned above). According to the calculation order, output data item b6 appears after output data item b5. Output data item b6 can be connected to output data item b5 through an output-output transfer line. At this time, the storage type attribute of output data item b6 can be set to virtual storage, that is, the circle representing output data item b6 is set to a hollow circle, and the storage type attribute of output data item b5 remains unchanged, that is, the circle representing output data item b5 is still a solid circle. Figure 5A The XML corresponding to the output output transfer line shown is as follows:
[0768] <PF id=""name="">
[0769] <PF id="F1 / PF1"name="">
[0770] <in>
[0771] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0772] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0773] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0774]
[0775] < / in>
[0776] <out>
[0777] <type id="b5"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0778] < / out>
[0779]
[0780] <PF id="F2 / PF2"name="">
[0781] <in>
[0782] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0783] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0784] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0785]
[0786] < / in>
[0787] <out>
[0788] <type id="b6"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="0" / >
[0789] < / out>
[0790]
[0791]
[0792] For example, the connection relationship between the output data item b5 and the output data item b6 can be recorded in the VMS part of the XML structure of the combined function block, that is, the connection relationship between the output data item b5 and the output data item b6 can be recorded. Figure 5A The output output transfer line shown. In the XML schema of this combined function block, Figure 5A The output of the output transfer line shown is as follows:
[0793]
[0794] For example, output data items b5 and b6 are both int type data items. The path attribute of the destination tag within the line tag in VMS is 0.out.0, which indicates the second relative path of output data item b5. The path attribute of the source tag within the line tag in VMS is 1.out.0, which indicates the second relative path of output data item b6. The memory of output data item b5 is 1, which indicates that output data item b5 is real storage, and the memory of output data item b6 is 0, which indicates that output data item b6 is virtual storage. Figure 5A The output of the output delivery line shown corresponds to the following JSON representation:
[0795]
[0796]
[0797] Figure 5B A schematic diagram of an input / output transmission line provided in one embodiment of the present disclosure.
[0798] For example, Figure 5BAs shown, a combined function block includes function block F3 / PF3 and function block F4 / PF4. According to the calculation order, function block F3 / PF3 is located before function block F4 / PF4. Function block F3 / PF3 includes input data item a8 (for example, the first input data item mentioned above). Function block F4 / PF4 includes output data item b7 (for example, the third output data item mentioned above). According to the calculation order, output data item b7 appears after input data item a8, and output data item b7 and input data item a8 do not belong to the same function block. Output data item b7 can be connected to input data item a8 through an output-input transfer line. At this time, the storage type attribute of output data item b7 can be set to virtual storage, that is, the circle representing output data item b7 is set to a hollow circle, and the storage type attribute of input data item a8 remains unchanged, that is, the circle representing input data item a8 is still a solid circle. Figure 5B The XML corresponding to the output and input transfer lines shown is as follows:
[0799] <PF id=""name="">
[0800] <PF id="F3 / PF3"name="">
[0801] <in>
[0802] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0803] <type id="a8"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0804] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0805]
[0806] < / in>
[0807] <out>
[0808] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0809] < / out>
[0810]
[0811] <PF id="F4 / PF4"name="">
[0812] <in>
[0813] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0814] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0815] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0816]
[0817] < / in>
[0818] <out>
[0819] <type id="b7"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="0" / >
[0820] < / out>
[0821]
[0822]
[0823] For example, the connection relationship between the output data item b7 and the input data item a8 can be recorded in the VMS part of the XML structure of the combined function block, that is, the connection relationship between the output data item b7 and the input data item a8 can be recorded. Figure 5B The output and input transfer lines shown. In the XML structure of the combined function block, Figure 5B The VMS corresponding to the output and input transfer lines shown are as follows:
[0824]
[0825] For example, output data item b7 and input data item a8 are both int type data items. The path attribute of the source tag within the line tag in VMS is 1.out.0, which represents the second relative path of output data item b7. The path attribute of the destination tag within the line tag in VMS is 0.in.0.0, which represents the second relative path of input data item a8. The memory of output data item b7 is 0, which indicates that output data item b7 is virtual storage, and the memory of input data item a8 is 1, which indicates that input data item a8 is real storage.
[0826] Figure 5C A schematic diagram of another input / output transmission line provided in an embodiment of the present disclosure.
[0827] For example, Figure 5C As shown, a combined function block includes function block F5 / PF5 and function block F6 / PF6. According to the calculation order, function block F5 / PF5 is located before function block F6 / PF6. Function block F5 / PF5 includes output data item b8 (for example, the third output data item mentioned above). Function block F6 / PF6 includes input data item a9 (for example, the first input data item mentioned above). According to the calculation order, output data item b8 appears before input data item a9, and output data item b8 and input data item a9 do not belong to the same function block. Output data item b8 can be connected to input data item a9 through an output-input transfer line. At this time, the storage type attribute of input data item a9 can be set to virtual storage, that is, the circle representing input data item a9 is set to a hollow circle, and the storage type attribute of output data item b8 remains unchanged, that is, the circle representing output data item b8 is still a solid circle. Figure 5C The XML corresponding to the output and input transfer lines shown is as follows:
[0828] <PF id=""name="">
[0829] <PF id="F5 / PF5"name="">
[0830] <in>
[0831] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0832] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0833] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0834]
[0835] < / in>
[0836] <out>
[0837] <type id="b8"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0838] < / out>
[0839]
[0840] <PF id="F6 / PF6"name="">
[0841] <in>
[0842] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0843] <type id="a9"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="0" / >
[0844] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0845]
[0846] < / in>
[0847] <out>
[0848] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0849] < / out>
[0850]
[0851]
[0852] For example, the connection relationship between the output data item b8 and the input data item a9 can be recorded in the VMS part of the XML structure of the combined function block, that is, the connection relationship between the output data item b8 and the input data item a9 can be recorded. Figure 5C The output and input transfer lines shown. In the XML structure of the combined function block, Figure 5C The VMS corresponding to the output and input transfer lines shown are as follows:
[0853]
[0854] For example, output data item b8 and input data item a9 are both int type data items. The path attribute of the source tag within the line tag in VMS is 0.out.0, which represents the second relative path of output data item b8. The path attribute of the destination tag within the line tag in VMS is 1.in.0.0, which represents the second relative path of input data item a9. The memory of output data item b8 is 1, which indicates that output data item b8 is real storage, and the memory of input data item a9 is 0, which indicates that input data item a9 is virtual storage.
[0855] Figure 5D A schematic diagram of another input / output transmission line provided in an embodiment of the present disclosure.
[0856] For example, Figure 5D As shown, a combined function block includes function block F7 / PF7, and function block F5 / PF5 includes an output data item b9 (for example, the third output data item mentioned above) and an input data item a10 (for example, the first input data item mentioned above). According to the calculation order, the output data item b9 appears after the input data item a10, and the output data item b9 and the input data item a10 belong to the same function block. The output data item b9 can be connected to the input data item a10 through the output-input transfer line. At this time, the storage type attribute of the input data item a10 remains unchanged, that is, the circle representing the input data item a10 is still a solid circle, and the storage type attribute of the output data item b9 is set to virtual storage, that is, the circle representing the output data item b9 is set to a hollow circle. Figure 5D The XML corresponding to the output and input transfer lines shown is as follows:
[0857] <PF id=""name="">
[0858] <PF id="F7 / PF7"name="">
[0859] <in>
[0860] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0861] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0862] <type id="a10"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0863]
[0864] < / in>
[0865] <out>
[0866] <type id="b9"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="0" / >
[0867] < / out>
[0868]
[0869]
[0870] For example, the connection relationship between the output data item b9 and the input data item a10 can be recorded in the VMS part of the XML structure of the combined function block, that is, the connection relationship between the output data item b9 and the input data item a10 can be recorded. Figure 5D The output and input transfer lines shown. In the XML structure of the combined function block, Figure 5D The VMS corresponding to the output and input transfer lines shown are as follows:
[0871]
[0872] For example, output data item b9 and input data item a10 are both int type data items. The path attribute of the source tag within the line tag in VMS is 0.out.0, which represents the second relative path of output data item b9. The path attribute of the destination tag within the line tag in VMS is 0.in.0.1, which represents the second relative path of input data item a10. The memory of output data item b9 is 0, which indicates that output data item b9 is virtual storage, and the memory of input data item a10 is 1, which indicates that input data item a10 is real storage.
[0873] Figure 5E A schematic diagram of an auxiliary merging connection provided by an embodiment of the present disclosure.
[0874] For example, Figure 5E As shown, a combined function block includes function block F8 / PF8 and function block F9 / PF9. According to the calculation order, function block F8 / PF8 is located before function block F9 / PF9. Function block F8 / PF8 includes input data item a11 (for example, the second input data item mentioned above). Function block F9 / PF9 includes input data item a12 (for example, the third input data item mentioned above). According to the calculation order, input data item a11 appears before input data item a12. Input data item a11 and input data item a12 do not belong to the same function block. Input data item a11 and input data item a12 can be connected by an auxiliary merge line. At this time, the storage type attribute of input data item a11 remains unchanged, that is, the circle representing input data item a11 is still a solid circle, and the storage type attribute of input data item a12 can be set to virtual storage, that is, the circle representing input data item a12 is set to a hollow circle. Figure 5E The XML corresponding to the output and input transfer lines shown is as follows:
[0875] <PF id=""name="">
[0876] <PF id="F8 / PF8"name="">
[0877] <in>
[0878] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0879] <type id="a11"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0880] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0881]
[0882] < / in>
[0883] <out>
[0884] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0885] < / out>
[0886]
[0887] <PF id="F9 / PF9"name="">
[0888] <in>
[0889] <type id="int2"name=""value=""typeclasss="1"typevalue="int2"typeid="">
[0890] <type id="a12"name=""value=""typeclasss="0"typevalue="int"typeid=""memory="0" / >
[0891] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0892]
[0893] < / in>
[0894] <out>
[0895] <type id=""name=""value=""typeclasss="0"typevalue="int"typeid=""memory="1" / >
[0896] < / out>
[0897]
[0898]
[0899] For example, the connection relationship between the input data item a11 and the input data item a12 can be temporarily recorded in the VMS part of the XML structure of the combined function block, that is, the connection relationship between the input data item a11 and the input data item a12 can be temporarily recorded in the VMS part of the XML structure of the combined function block. Figure 5E The auxiliary merge line shown. The attribute of the VMS part is undirected="". After the interface is formed, the connection relationship is updated in the PFVMS part and the relevant content of the VMS part is deleted.
[0900] In the XML structure of the combined function block, Figure 5E The VMS corresponding to the auxiliary merge line shown is as follows:
[0901]
[0902] For example, input data item a11 and input data item a12 are both int type data items. The path attribute of the source tag within the line tag in VMS is 0.in.0.0, which represents the second relative path of input data item a11. The path attribute of the destination tag within the line tag in VMS is 1.in.0.0, which represents the second relative path of input data item a12. The memory of input data item a11 is 1, which indicates that input data item a11 is real storage. The memory of input data item a12 is 0, which indicates that input data item a12 is virtual storage.
[0903] For example, Figure 1As shown, the interface corresponding to each function block in the plurality of function blocks includes an input portion and an output portion. In step S13, at least two function blocks are encapsulated into a combined function block, and an interface corresponding to the combined function block is generated, including: combining and encapsulating at least one input data item extracted as an interface corresponding to the combined function block to obtain the input portion of the interface corresponding to the combined function block; combining and encapsulating at least one output data item extracted as an interface corresponding to the combined function block to obtain the output portion of the interface corresponding to the combined function block.
[0904] For example, the interface corresponding to the combination function block is stored in the interface part of the selected combination paradigm.
[0905] The input parts of all function blocks in the calculation sequence (i.e., at least two function blocks used to combine the combined function block) are merged in sequence to determine the input part of the interface corresponding to the combined function block, and the output parts of all function blocks in the calculation sequence are merged in sequence to determine the output part of the interface corresponding to the combined function block. For example, in some examples, the input data items extracted as the interface can be combined into one or more input data items in sequence, and the one or more input data items serve as the input part of the interface. For example, the one or more input data items can include data items of combined data types other than XOR types, and can also include data items of basic data types or data items of pointer types or generic types; the output data items extracted as the interface can be combined into one or more output data items in sequence, and the one or more output data items serve as the output part of the interface. For example, the one or more output data items can include data items of combined data types, and can also include data items of basic data types or data items of pointer types or generic types.
[0906] For example, in step S13, at least two function blocks are encapsulated into a combined function block, and the interface corresponding to the combined function block is generated, which also includes at least one of the following items: for any one of the at least two function blocks, when the data type attribute of any input data item or output data item corresponding to any function block is a combined data type, if a certain data item in any input data item or output data item is not extracted as part of the interface corresponding to the combined function block, then any input data item or output data item is broken up, the certain data item is not extracted, and the remaining data items in any input data item or output data item are recombined as part of the interface corresponding to the combined function; for any one of the at least two function blocks, when any input data item or output data item corresponding to any function block is a pointer type data item, and any input data item or output data item of the pointer type is extracted as part of the interface corresponding to the combined function block, the data structure of any input data item or output data item of the pointer type is not broken up; for any one of the at least two function blocks, when any input data item or output data item corresponding to any function block is a constant data item, the constant input data item or constant output data item is not extracted. The data item is taken as part of the interface corresponding to the combined function block; for the input data items corresponding to at least two function blocks, the input data items whose storage type attribute is virtual storage are not extracted as part of the interface corresponding to the combined function block; for any output data item corresponding to the at least two function blocks, in response to any output data item being directly or indirectly connected to at least one output data item through a data transmission line, the output data item that appears first between any output data item and at least one output data item is obtained as the output data item to be extracted; in the case where the output data item to be extracted is connected to any input data item, if the output data item to be extracted appears before any input data item, the output data item to be extracted is not extracted as part of the interface corresponding to the combined function block; if the output data item to be extracted appears after any input data item or the output data item to be extracted and any input data item belong to the same function block, the output data item to be extracted is extracted as part of the interface corresponding to the combined function block; according to requirements, some data items of the output data items corresponding to the at least two function blocks that have not been extracted as interfaces are extracted as interfaces; for the output data items corresponding to the at least two function blocks, all the output data items corresponding to the at least two function blocks are extracted as the interface corresponding to the combined function block.
[0907] For example, if the data type of a data item extracted as an interface is a pointer type, the internal data structure of the pointer-type data item is not broken up. The input and output parts of all function blocks in the calculation sequence are merged in order. If the combined structure of the same function block contains a data item that is not extracted as an interface, the remaining data items other than the data item are reassembled and extracted as part of the interface. The data item is not included in the reassembly and is not considered part of the interface.
[0908] For example, for the input data items corresponding to at least two function blocks, the input data items with the storage type attribute of real storage are extracted as part of the interface corresponding to the combined function block, the input data items with the storage type attribute of virtual storage are not extracted as part of the interface corresponding to the combined function block, and the input data items of constant type are not extracted as part of the interface corresponding to the combined function block.
[0909] For example, for output data items corresponding to at least two function blocks, there are three ways to extract the output data items: first, extract all output data items as part of the interface corresponding to the combined function block; second, the user can manually choose whether to extract the output data items as part of the interface corresponding to the combined function block; third, for any output data item corresponding to at least two function blocks, first determine whether there is at least one output data item with a direct connection relationship and an indirect connection relationship for any output data item. If so, obtain the output data item that appears first in any output data item and at least one output data item as the output data item to be extracted. In the case where the output data item to be extracted is connected to any input data item, if the output data item to be extracted is connected to any input data item, then If the extracted output data item appears before any input data item, the output data item to be extracted is not extracted as part of the interface corresponding to the combined function block. If the output data item to be extracted appears after any input data item or the output data item to be extracted and any input data item belong to the same function block, the output data item to be extracted is extracted as part of the interface corresponding to the combined function block. Finally, for the output data items in at least two function blocks that are not extracted to the interface corresponding to the combined function block, the user can manually select whether to extract them as part of the interface corresponding to the combined function block. For example, the manual selection process can be performed at any time after the interface extraction is completed, such as when it is found that there are not enough output data items when using PF. For example, in any output data item and at least one output data item, the remaining output data items except the output data item to be extracted are not extracted as part of the interface corresponding to the combined function block.
[0910] It should be noted that when the output data item to be extracted appears after any input data item or the output data item to be extracted and any input data item belong to the same function block, and the output data item to be extracted is extracted as part of the interface corresponding to the combined function block, when the combined function block is used, the connection relationship between the output data item to be extracted and any input data item needs to be represented on the interface corresponding to the combined function block.
[0911] For example, in the same function block in a calculation sequence, if there is a data item in a composite data item (i.e., the data type attribute is a composite data type, and it can be an input data item or an output data item) that is not extracted as the interface corresponding to the composite function block, then when extracting the interface, the composite structure of the composite data item is broken up, and the individual data items in the composite data item are recombined. All outer composite types of the composite data item are removed, exposing the remaining data items extracted as interfaces in the composite data item, and then these data items are recombined according to the combination rules.
[0912] Figure 6 A schematic diagram of a combined function block provided for some embodiments of the present disclosure.
[0913] For example, Figure 6 As shown, the combined function block includes a function block PF10 and a function block PF11. The function block PF10 has two input data items a13 and a14 and one output data item b10. The function block PF11 has three input data items a15, a16 and a17 and two output data items b11 and b12.
[0914] For example, the XML representation of the calculation sequence part in the XML schema corresponding to the combined function block is as follows:
[0915] <PF id="PF10"name="">
[0916] <in>
[0917] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="int2"memory="1">
[0918] <type id="a13"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / ><type id="a14"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / >
[0919] < / in>
[0920] <out>
[0921] <type id="b10"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / >< / out>
[0922]
[0923] <PF id="PF11"name="">
[0924] <in>
[0925] <type id=""name=""value=""typeclass="1"typevalue="intintint"typeid="intintint"memory="1">
[0926] <type id="a15"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / ><type id="a16"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / ><type id="a17"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / >
[0927] < / in>
[0928] <out>
[0929] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="int2"memory="1">
[0930] <type id="b11"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / ><type id="b12"name=""value=""typeclass="0"typevalue="int"typeid="int"memory="1" / >
[0931] < / out>
[0932]
[0933] For example, the first input pin in function block PF11, i.e., input data item a15, is connected to the first output pin in function block PF10, i.e., output data item b10, via a transmission line from output to input. At this time, the input data item a15 is not extracted as an interface. Thus, when generating the interface corresponding to the combined function block, the input data items of the combined data type of the input part in the interface corresponding to function block PF11 are broken up, i.e., the outer combined structure of the input part is removed, exposing the remaining data items in the combined structure (i.e., input data item a16 and input data item a17), and the remaining data items are recombined and extracted as part of the interface corresponding to the combined function block. Then, according to the combination rules, the data items are recombined, i.e., the input data items in the interface corresponding to function block PF10 (the combined data item formed by combining input data items a13 and a14) and the input data items a16 and input data items a17 in the interface corresponding to function block PF11 are recombined to obtain the input part of the interface corresponding to the combined function block.
[0934] The output data item b11 and the output data item b12 of the output part in the interface corresponding to the function block PF11 are combined to obtain the output part of the interface corresponding to the combined function block.
[0935] For example, since the combined input data item formed by combining the input data items a13 and a14 corresponding to the function block PF10 is not broken up, the combined structure of the combined input data item remains unchanged.
[0936] For example, the input data item a15 corresponding to the function block PF11 is not extracted as part of the interface corresponding to the combined function block, the combined input data item composed of the input data items a15, a16 and a17 corresponding to the function block PF11 is broken up, and the input data items a16 and a17 are recombined with the combined input data items corresponding to the function block PF10 to obtain the input data items of the combined function block.
[0937] For example, the XML representation of the interface part in the XML architecture corresponding to the combined function block is as follows:
[0938]
[0939]
[0940] According to the XML of the above interface part, it can be seen that the data type attribute of the input data item of the input part of the interface corresponding to the combined function block is int2 (intint). The input part includes a three-layer structure. The first layer of the input part includes an input data item int2 (intint) of a combined data type. In the first layer of the input part, the relative address attribute of the input data item int2 (intint) is 0; the second layer of the input part includes a combined input data item int2 (the data type attribute is a combined data type, such as int2, i.e. a13 and a14) and a combined input data item intint (the data type attribute is a combined data type, such as intint, i.e. a16 and a17). In the second layer of the input part, the relative address attribute of the combined input data item int2 The address attribute is 0, and the relative address attribute of the combined input data item intint is 1; the third layer of the input part includes the input data item a13 (the data type attribute is the basic data type, such as int) and the input data item a14 (the data type attribute is the basic data type, such as int) in the combined input data item int2, and also includes the input data item a16 (the data type attribute is the basic data type, such as int) and the input data item a17 (the data type attribute is the basic data type, such as int) in the combined input data item intint. In the third layer of the input part, the relative address attribute of the input data item a13 is 0, the relative address attribute of the input data item a14 is 1, the relative address attribute of the input data item a16 is 0, and the relative address attribute of the input data item a17 is 1.
[0941] It should be noted that the memory property is automatically set by the visualization, and by default memory = 1.
[0942] The data type attribute of the output data item of the output part of the interface corresponding to the combined function block is int2. The output part includes a two-layer structure. The first layer of the output part includes an output data item int2 of a combined data type. In the first layer of the output part, the relative address attribute of the output data item int2 is 0; the second layer of the output part includes output data item b11 (the data type attribute is a basic data type, such as int) and output data item b12 (the data type attribute is a basic data type, such as int). In the second layer of the output part, the relative address attribute of the output data item b11 is 0, and the relative address attribute of the output data item b12 is 1.
[0943] For example, Figure 6As shown, the circles representing input data items a13, a14, a16, a17, and output data items b10, b11, and b12 are all solid circles, meaning that the storage-like properties of input data items a13, a14, a16, a17, and output data items b10, b11, and b12 are all real storage. The circle representing input data item a15 is hollow, meaning that the storage-like property of input data item a15 is virtual storage. Input data item a15 and output data item b10 are connected by a data transfer line (a line with an arrow pointing to input data item a15).
[0944] For example, in some embodiments, the method provided by the present disclosure further includes: selecting at least one basic function block representing an assignment expression and at least one basic function block representing a relational expression from the basic function blocks as at least two function blocks. For example, in other embodiments, the basic function blocks representing arithmetic expressions include a basic function block representing integer addition and a basic function block representing integer subtraction. The method provided by the present disclosure further includes: selecting at least one basic function block representing integer addition and / or at least one basic function block representing integer subtraction and at least one basic function block representing a relational expression from the basic function blocks as at least two basic function blocks. At this time, combining the at least two function blocks according to at least one combinational paradigm among multiple combinational paradigms includes: selecting at least one of a sequential combinational paradigm, a conditional combinational paradigm, a loop combinational paradigm, and a while-type loop combinational paradigm as at least one combinational paradigm; and combining the at least two function blocks according to at least one combinational paradigm.
[0945] The following describes respectively the process of combining at least two function blocks based on different combination paradigms and performing a splicing operation to finally obtain a combined function block.
[0946] Figure 7A A schematic diagram of a method for combining function blocks based on a sequential combination paradigm provided in some embodiments of the present disclosure; Figure 7B A schematic diagram of a graphical representation of at least two function blocks provided in some embodiments of the present disclosure; Figure 7C A schematic diagram of a graphical expression of a constant data item provided in some embodiments of the present disclosure.
[0947] For example, in the process of organizing the combined function blocks of the sequential structure, the structure template of the sequential combination paradigm is gradually filled with at least one function block.
[0948] For example, Figure 7A As shown, the method for combining function blocks based on the sequential combination paradigm includes steps S50-S56.
[0949] For example, step S50 includes: selecting a sequential combination paradigm.
[0950] For example, step S51 includes: selecting at least two function blocks and organizing a calculation sequence.
[0951] For example, at least two function blocks (basic function blocks and / or combined function blocks) can be selected from a function block library, and the at least two function blocks are arranged based on the sequential combination paradigm and permutation operations to form a corresponding calculation sequence. Under the sequential combination paradigm, the at least two function blocks can be sequentially combined. The id values of data items in the at least two function blocks can be specified, that is, the id values of data items can be modified as required, so that the calculation sequence is easier to understand.
[0952] For example, as Figure 7B shown, in some embodiments, the number of at least two function blocks is 2, that is, two function blocks F / PF13 and F / PF14 are selected from the function block library. Figure 7B shows a graphical representation form of the two function blocks F / PF13 and F / PF14. For example, the function block F / PF13 includes input data items r11 and r12, etc., and also includes output data items e11, etc.; the function block F / PF14 includes input data items r13 and r14, etc., and also includes output data items e12, etc. The function blocks F / PF13 and F / PF14 can be basic function blocks or combined function blocks. It should be noted that the present disclosure is not limited thereto, and the number of at least two function blocks can also be 3, 5 or more or less.
[0953] For example, the XML representation of the calculation sequence formed by the two function blocks F / PF13 and F / PF14 is:
[0954] <F / PF id="F / PF13" name="system number">
[0955] <in>
[0956] <type id=""name=""value=""typeclass=""typevalue="T"typeid="">
[0957] <type id="r11"name=""value=""typeclass=""typevalue="T1"typeid="" / >
[0958] <type id="r12"name=""value=""typeclass=""typevalue="T2"typeid="" / > ...
[0960]
[0961] < / in>
[0962] <out>
[0963] <type id="e11"name=""value=""typeclass=""typevalue="T3"typeid="" / >
[0964] < / out>
[0965]
[0966] <F / PF id="F / PF14" name="system number">
[0967] <in>
[0968] <type id=""name=""value=""typeclass=""typevalue="T"typeid="">
[0969] <type id="r13"name=""value=""typeclass=""typevalue="T4"typeid="" / >
[0970] <type id="r14"name=""value=""typeclass=""typevalue="T5"typeid="" / > ...
[0972]
[0973] < / in>
[0974] <out>
[0975] <type id="e12"name=""value=""typeclass=""typevalue="T6"typeid="" / >
[0976] < / out>
[0977]
[0978] For example, the name attribute of function block F / PF13 represents the global address (i.e., system number) of function block F / PF13 in the function block library and remains unchanged. Similarly, the name attribute of function block F / PF14 represents the global address (i.e., system number) of function block PF12 in the function block library and remains unchanged.
[0979] For example, when the function block F / PF13 or the function block F / PF14 is a basic function block, the XML of the function block F / PF13 or the function block F / PF14 is included in <f> and< / f> When the function block F / PF13 or the function block F / PF14 is a combined function block, the XML of the function block F / PF13 or the function block F / PF14 is included in <pf> and< / pf> between.
[0980] For example, after forming a calculation sequence, the data item can be attributed. Step S52 includes: constant setting. Attribute setting includes: selecting a data item and initializing the attribute value of the data item in the attribute area. For example, the attribute setting may include constant setting. For example, if a data item in the calculation sequence is a constant data item, the constant attribute of the constant data item is modified, such as Figure 7C As shown, for example, a data item a of int type is a constant data item, and the value of the data item a is set to 5.
[0981] For example, users can modify the ID of the input / output data items in the calculation sequence as required, such as Figure 7C In the graphical representation shown, the "variable name" is the id of the data item. For example, in Figure 7C In the example shown, the id of the data item can be set to a, the data item a is selected as a constant, and the constant value is set to 5.
[0982] The value of a constant data item is stored directly in the value attribute of the data item.
[0983] Figure 8A A schematic diagram of a graphical expression of a calculation sequence provided in some embodiments of the present disclosure; Figure 8B for Figure 8A A schematic diagram of a graphical representation of a constant data item is shown; Figure 8C For Figure 8A Schematic diagram of the graphical representation of the calculation sequence shown after wiring.
[0984] For example, in one example, it is necessary to build a combination function block to realize the calculation function of finding the average value of two int type data. For example, the mathematical function expression corresponding to the calculation function is: y = (a + b) / 2. Based on the analysis of the mathematical function corresponding to the calculation function, it can be seen that the addition function block (to realize the addition calculation function), the division function block (to realize the division calculation function) and the assignment function block (to realize the assignment function) can be selected to realize the calculation function.
[0985] First, if Figure 8A As shown, three function blocks are selected from the function block library, namely the addition function block expaddI, the division function block expdivI and the assignment function block assignint. Based on the sequential combination paradigm and the arrangement operation, the three function blocks are arranged to obtain the corresponding calculation sequence. The graphical expression of the calculation sequence composed of the three function blocks is as follows Figure 8A As shown. Figure 8A As shown, the addition function block expaddI includes two input data items g11 and g12 and one output data item k11, the division function block expdivI includes two input data items g13 and g14 and one output data item k12, and the assignment function block assignint includes one input data item g15 and one output data item k13.
[0986] For example, Figure 8A As shown, the input data item g14 corresponding to the second input pin of the division function block expdivI is a constant data item, and the value of the constant data item g14 can be 2. For example, Figure 8B As shown, the value of the constant data item g14 is set to 2, the variable name corresponding to the constant data item g14 is g14, the data type attribute of the constant data item g14 is int type, and the storage type attribute corresponding to the constant data item g14 is real storage.
[0987] For example, the XML representation of the calculation sequence composed of the three function blocks is:
[0988] <F id="expaddI"name="">
[0989] <in>
[0990] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[0991] <type id="g11"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[0992] <type id="g12"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[0993]
[0994] < / in>
[0995] <out>
[0996] <type id="k11"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[0997] < / out>
[0998]
[0999] <F id="expdivI"name="">
[1000] <in>
[1001] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[1002] <type id="g13"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1003] <type id="g14"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1004]
[1005] < / in>
[1006] <out>
[1007] <type id="k12"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1008] < / out>
[1009]
[1010] <F id="assignint"name="">
[1011] <in>
[1012] <type id="g15"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1013] < / in>
[1014] <out>
[1015] <type id="k13"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1016] < / out>
[1017]
[1018] For example, in the XML of the above calculation sequence, since the addition function block expaddI, the division function block expdivI and the assignment function block assignint are all basic function blocks, the XML of each of the addition function block expaddI, the division function block expdivI and the assignment function block assignint is included in <f> and< / f> between.
[1019] Since the division function block expdivI includes a constant-type input data item g14, and the value of the constant-type input data item g14 is 2, the value attribute of the input data item g14 is set to 2.
[1020] <F id="expdivI"name="">
[1021] <in>
[1022] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[1023] <type id="g13"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1024] <type id="g14"name=""value="2"typeclass="0"typevalue="int"typeid=""memory="1" / >
[1025] < / in>
[1026] <out>
[1027] <type id="k12"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1028] < / out>
[1029]
[1030] For example, the storage type attribute of each data item (input data item and output data item) is set to 1 by default, that is, memory = "1", however, the present disclosure is not limited to this, and the storage type attribute of each data item can be set to empty, that is, no value is set, memory = "".
[1031] For example, Figure 7A As shown, step S53 includes executing a connection operation to generate a VMS, i.e., executing data transfer connection and auxiliary merging connection operations. In step S53, based on the calculation sequence, it is determined which data items (input data items and / or output data items) in at least two function blocks can be connected via data transfer connections and / or auxiliary merging connections. That is, after obtaining the calculation sequence, the connections between the internal data items of the function blocks can be combined according to the connection rules to generate a VMS corresponding to the combined function blocks.
[1032] For example, two data items with matching data type attributes and the same data category attributes can be connected using a data transfer wire and / or an auxiliary merge wire.
[1033] If a data item is a data item of a basic composite data type, that is, typeclass = 1, the data item can be expanded. The expansion action has no effect on the data type attributes and data category attributes of the data item and the data items contained within it. After the composite data type is expanded, a type matching judgment can be performed on the data items contained within it. If the type matching is successful, the data items contained within can be connected. If the data items contained within the composite data item are also data items of the composite data type, the expansion action can continue to be applied to the data items contained within until the data item type meets the type matching rules or the data item is a basic data type, a general pointer type, or a generic type.
[1034] In some embodiments, when an output data item and an input data item satisfy a type matching rule, the output data item is connected to the input data item via an output-input transfer line in a data transfer connection. If the output data item appears before the input data item, the storage type attribute of the input data item is set to virtual storage, the storage type attribute of the output data item remains unchanged, and the connection relationship between the output data item and the input data item is recorded. In this case, the output-input transfer line is graphically represented as follows: connecting the output data item to the input data item via a line with an arrow, the arrow pointing to the input data item, changing the graphic representing the input data item (e.g., a circle) to a hollow graphic, and the graphic representing the output data item remains unchanged; and the output-input transfer line is represented in the XML of the VMS portion as follows: in the XML of the VMS portion, storing the second relative path of the input data item in the path attribute of the destination tag at the end point of the directed line segment connecting the input data item, storing the second relative path of the output data item in the path attribute of the source tag at the starting point of the directed line segment connecting the output data item, setting the memory value of the input data item to 0, and keeping the memory value of the output data item unchanged.
[1035] In other embodiments, when the output data item and the input data item meet the type matching rules, the output data item is connected to the input data item through the output-input transfer line in the data transfer connection. If the output data item appears after the input data item, or if the output data item and the input data item belong to the same function block, the storage type attribute of the output data item is set to virtual storage, the storage type attribute of the input data item is not changed, and the connection relationship between the input data item and the output data item is recorded. In this case, the output-input transfer line is represented graphically as follows: the output data item is connected to the input data item through a line with an arrow, the arrow points to the input data item, the graphic representing the output data item (for example, a circle) is changed to a hollow graphic, and the graphic representing the input data item is not changed; the output-input transfer line is represented in the XML of the VMS part as follows: in the XML of the VMS part, the second relative path of the input data item is stored in the path attribute of the destination tag at the end point of the directed line segment connecting the input data item, the second relative path connecting the output data item is stored in the path attribute of the source tag at the starting point of the directed line segment of the output data item, the memory value of the output data item is set to 0, and the memory value of the input data item remains unchanged.
[1036] For example, Figure 8C As shown, the output data item k11 corresponding to the output pin of the addition function block expaddI and the input data item g13 corresponding to the first input pin of the division function block expdivI are connected through an output-input transmission line, and the output data item k12 corresponding to the output pin of the division function block expdivI and the input data item g15 corresponding to the input pin of the assignment function block assignint are connected through an output-input transmission line. It should be noted that Figure 8C In FIG, a line with an arrow represents an input / output transmission line, and the arrow represents the data flow direction of the input / output transmission line.
[1037] For example, Figure 8C As shown in the graphical expression, after the data items are connected, the output data item k11 is connected to the input data item g13 through the output-input transmission line with an arrow, and the output data item k11 is transmitted to the input data item g13; the output data item k12 is connected to the input data item g15 through the output-input transmission line with an arrow, and the output data item k12 is transmitted to the input data item g15. The storage type attributes of the input data item g13 of the division function block expdivI and the input data item g15 of the assignment function block assignint are both modified to virtual storage. Figure 8CIt is reflected as follows: the solid circle representing the input data item g13 of the division function block expdivI becomes a hollow circle, and the solid circle representing the input data item g15 of the assignment function block assignint becomes a hollow circle.
[1038] For example, in the XML expression form of the VMS part, the relative address attribute of the output data item k11 of the addition function block expaddI is the second relative path of the output data item k11 of the addition function block expaddI, that is, 0.out.0; the relative address attribute of the input data item g13 of the division function block expdivI is the second relative path of the input data item g13 of the division function block expdivI, that is, 1.in.0.0; the relative address attribute of the output data item k12 of the division function block expdivI is the second relative path of the output data item k12 of the division function block expdivI, that is, 1.out.0; the relative address attribute of the input data item g15 of the assignment function block assignint is the second relative path of the input data item g15 of the assignment function block assignint, that is, 2.in.0. The storage type attributes of the input data item g13 of the division function block expdivI and the input data item g15 of the assignment function block assignint are both modified to virtual storage, that is, the memory corresponding to the input data item g13 of the division function block expdivI and the memory corresponding to the input data item g15 of the assignment function block assignint are both set to 0.
[1039] For example, Figure 8C The VMS XML representation corresponding to the connection relationship shown is:
[1040]
[1041]
[1042] In some embodiments, when two output data items meet the type matching rules, the two output data items are connected through an output-output transfer line in a data transfer line, and the output data item that appears first is defined as Out1, and the output data item that appears later is defined as Out2. The output data item Out2 is connected to the output data item Out1 through the output-output transfer line. At this time, the storage type attribute of the output data item Out2 is set to virtual storage, the storage type attribute of the output data item Out1 is not changed, and the connection relationship between the output data item Out1 and the output data item Out2 is recorded. In this case, the output-output transfer line is graphically represented as follows: the output data item Out2 is connected to the input data item Out1 through a line with an arrow, the arrow points to the output data item Out1, the graphic representing the output data item Out2 (for example, a circle) is changed to a hollow graphic, and the graphic representing the output data item Out1 is not changed; the output-output transfer line is represented in the XML of the VMS part as follows: in the XML of the VMS part, the second relative path of the output data item Out1 is stored in the path of the destination tag, the second relative path of the output data item Out2 is stored in the path of the source, the memory value of the output data item Out2 is set to 0, and the memory value of the output data item Out1 remains unchanged.
[1043] Figure 8C In the example shown, there are no inbound and outbound transfer lines or auxiliary merge lines.
[1044] For a generic data item D1, after establishing a connection (data transfer connection and / or auxiliary merge connection) between the generic type and another data item D2 of any type other than a pointer type, the following generic-related rules apply:
[1045] First, if D2 is generic, the data category attributes and data type attributes of D1 and D2 remain unchanged;
[1046] Second, if D2 is any data item other than a pointer or generic, the value of D1's data category attribute becomes the same as the value of D2's data category attribute, and the value of D1's data type attribute becomes the same as the value of D2's data type attribute.
[1047] For pointer-type data items, establishing a connection (data transfer connection and / or auxiliary merge connection) between two pointer-type data items also has the following pointer-type-related rules:
[1048] First, when a data item REF1 of a general pointer type is connected to a data item REF2 of a pointer type with a pointed-to type (i.e., the data item REF2 points to a data item of a specific data type, and the pointed-to type indicates the type of the data item pointed to by the data item REF2 of the pointer type), the data item REF1 obtains the pointed-to type, and the pointed-to type of the data item REF1 is consistent with the pointed-to type of the data item REF2.
[1049] Second, one or more pointer-type data items REFk connected to the data item REF1 via data transfer lines and / or auxiliary merge lines, where k is any positive integer, k>0. If the data item REFk is a general pointer type, then the data item REFk also obtains the pointing type of the data item REF2;
[1050] Third, for the data item REFm on the other side of the assignment function assignref to which the data item REFk belongs, if the data item REFk obtains the type pointed to by the data item REF2, then the data item REFm also obtains the type pointed to by the data item REF2, thereby making the data type of the input data item and the data type of the output data item of the assignment function assignref the same. In the assignment function assignref, if the data item REFk is the input data item, then the data item REFm is the output data item; if the data item REFk is the output data item, then the data item REFm is the input data item, and m>0;
[1051] Fourth, for the data item REFn on the other side of the addAddress function block to which the data item REFk belongs, if the data item REFk obtains the pointing type of the data item REF2, then the data item REFm also obtains the pointing type of the data item REF2, thereby making the data type pointed to by the input pointer type data item and the data type pointed to by the output pointer type data item of the addAddress function block the same. In addAddress, if the data item REFk is an input data item, then the data item REFn is an output data item; if the data item REFk is an output data item, then the data item REFn is an input data item, and n>0;
[1052] Fifth, for the function block getName, when the input data item of the function block getName is generic (i.e., any data type) and the output data item of the function block getName is a general pointer type, when the input data item is connected to a data item T of a specific data type attribute (basic data type / combined data type), the input data item obtains the data type attribute of the data item T, that is, the data type attribute of the input data item is the same as the data type attribute of the data item T, the output data item of the general pointer type obtains the pointed type, and the pointed type of the output data item is the same as the data type attribute of the data item T, and the rules described above from the first to the third continue to apply.
[1053] Sixth, the data item connected to the data item REFm through the data transfer line and / or the auxiliary merge line (for example, the data type of the data item is the same as the pointing type of the data item REF2) continues to apply the rules described in the first to third paragraphs above.
[1054] In summary, for the first pointer data item and the second pointer data item in at least some of the input data items and / or at least some of the output data items, the data type attribute of the first pointer data item is a universal pointer type, and the second pointer data item is a non-universal pointer type, that is, the second pointer data item has a data item pointed to, and in response to the first pointer data item and the second pointer data item being connected through a data transfer line or an auxiliary merging line, the data item pointed to by the first pointer data item is set to be the same as the data item pointed to by the second pointer data item.
[1055] When the type of a data item of a general pointer type is determined, the type format of the data item pointed to by the pointer type is recorded within the general pointer data item. For example, a pointer data item with id r contains the type description of the data item d it points to. The XML representation of the pointer part is:
[1056] <type id="r"name=""value=""typeclass="4"typevalue="&T1"typeid="">
[1057] <type id="d"name=""value=""typeclass=""typevalue="T1"typeid="" / >
[1058]
[1059] If a data item is a non-generic pointer type, you can perform an expansion action on the data item. This expansion action has no effect on the data type attributes and data category attributes of the data item and the data items contained within it. After the pointer type is expanded, a type matching judgment can be performed on the data items contained within. If the type matching is successful, a wiring action can be performed on the data items contained within. If the data items contained within the pointer data item are also composite data types (basic composite data types, XOR types, array types, non-generic pointer types), the expansion action can continue to be applied to the data items contained within until the data item type meets the type matching rules or the data item is a basic data type, a generic pointer type, or a generic type.
[1060] For example, Figure 7A As shown, step S54 includes: generating an interface.
[1061] For example, the XML representation of the interface part corresponding to each combined function block is as follows:
[1062] <PF id=""name="">
[1063] <in>
[1064] Input section
[1065] < / in>
[1066] <out>
[1067] Output section
[1068] < / out>
[1069]
[1070] The interface part of the combined function block consists of the name of the combined function block, the input part and the output part. The name of the combined function block can include: user-defined name, represented by id; system-defined name, represented by name. The encoding rules are the same as those of the basic function block. The input part of the combined function block is represented by <in>< / in> Structure representation, the output part of the combined function block is represented by <out>< / out> Structural representation, <in> and< / in> The specific input data items are between them. <out> and< / out> In between are the specific output data items.
[1071] In the XML of the interface part, data items (input data items and output data items) are represented as:
[1072] <type id="" name="" value="" typeclass="type category" typevalue="type label" typeid="user-defined type name" memory="" / >; where, typevalue represents the data type attribute of the data item, that is, the type label of the combined data item, following the type naming rules; id represents the annotation description of the data item, which can be specifically named by the user; name represents the physical address of the data item (that is, the physical address where the data item is located during the operation of the algorithm); value can represent the value of the data item. If the data value is not empty, it means that the data item is a constant data item. In the graphical representation, the constant data item is represented as a yellow solid circle; typeclass can represent the data category attribute of the data item, which is determined by the combined paradigm used; typeid represents the name of the user-defined data type attribute, such as linknode, treenode, etc.; memory represents the storage type attribute of the data item. When the value of memory is 0, it represents virtual storage, and the graphical representation is a hollow circle. When the value of memory is 1, it represents real storage, and the graphical representation is a solid circle. For example, typeclass can be represented by numbers. When typeclass is 0, it represents a basic data type; when typeclass is 1, it represents a basic combined data type; when typeclass is 2, it represents that the data structure is an array structure; when typeclass is 3, it represents a 1-of-2 structure type; when typeclass is 4, it represents a pointer type; when typeclass is 5, it represents a generic type.
[1073] For example, when at least one combined paradigm is a sequential combined paradigm and the combined function block is a combined function block of a sequential structure. At this time, when encapsulating at least two function blocks into a combined function block and generating the interface corresponding to the combined function block, the data items in the interface corresponding to the combined function block are generated in the order of the calculation sequence from the data items in the interfaces corresponding to at least two function blocks. Each of the at least two function blocks can extract one data item (that is, extract all the input data items that can be extracted as interfaces in the function block into one data item, and extract all the output data items that can be extracted as interfaces in the function block into one data item) or not extract any data item according to the interface extraction rules after completing the wiring action. The data category attribute of the data items in the interface corresponding to the combined function block is a basic combined data type.
[1074] Assume that for the sequential combination paradigm, when forming the input part or output part of the interface of the combination function block of the sequential structure, n data items d1, d2, ... dn are extracted from the calculation sequence, the data categories of the n data items are tc1, tc2, ... tcn, and the data types are t1, t2, ... tn, respectively. Among them, n>1, then the formed interface data item (i.e., the interface data item) is a data item of the basic combination data type, and the interface data item contains the description of the n data items d1, d2, ... dn. The XML description of the interface data item is as follows:
[1075] <type id=""name=""value=""typeclass="1"typevalue=""typeid="">
[1076] <type id=""name=""value=""typeclass="tc1"typevalue="t1"typeid="" / >
[1077] <type id=""name=""value=""typeclass="tc2"typevalue="t2"typeid="" / > ......
[1079] <type id=""name=""value=""typeclass="tcn"typevalue="tn"typeid="" / >
[1080]
[1081] Assume that for the sequential combination paradigm, when forming the input part or output part of the interface of the combination function block of the sequential structure, a data item d1 is extracted from the calculation sequence. The data category of this data item is tc1 and the data type is t1. Then the basic combination data type originally applied to the formed interface data item can be omitted, and the data item d1 is directly used as the interface data item. The XML description of this interface data item is as follows:
[1082] <type id=""name=""value=""typeclass="tc1"typevalue="t1"typeid="" / >
[1083] Figure 8D Based on Figure 8C The schematic diagram of the graphical expression of the interface corresponding to the combined function block determined by the connection relationship shown, Figure 8E for Figure 8D The storage hierarchy diagram of the interface is shown.
[1084] For example, Figure 8D The figure shows a graphical representation of the interface corresponding to the combination function block. (a+b) / 2 can be the name of the combination function block, which is defined by the user. The input part of the interface includes two input data items, and the output part of the interface includes one output data item. Figure 8E As shown, in the storage hierarchy structure diagram of the interface corresponding to the combined function block, the total level of the input part is 2, the total level of the output part is 1, the current display level of the input part is 2, and the current display level of the output part is 1. At this time, the input part shows two input data items, and the output part shows one output data item.
[1085] It should be noted that, for the extraction rules of the interface of the combination function block of the sequence structure, reference can be made to the relevant description of the extraction interface mentioned above, which will not be repeated here.
[1086] For example, Figure 8D The XML representation of the interface shown is:
[1087] <PF id="(a+b) / 2"name="">
[1088] <in>
[1089] <type id="int2"name=""value=""typeclass="1"typevalue="int2"typeid=""memory="1">
[1090] <type id="g11"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1091] <type id="g12"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1092]
[1093] < / in>
[1094] <out>
[1095] <type id="k13"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1096] < / out>
[1097] .
[1098] For example, Figure 7A As shown, step S55 includes generating a PFVMS. After generating the interface corresponding to the combined function block, the XML portion of the PFVMS corresponding to the combined function block can be generated. The PFVMS portion is used to describe the corresponding relationship between the corresponding data items in the calculation sequence composed of each function block and the data items in the interface of the combined function block, and also describes the relationship between the auxiliary merging lines between the input data items. After the PFVMS is generated, the portion of the VMS with the undirected attribute is deleted. It should be noted that in the PFVMS, the relationship between the auxiliary merging lines between input data items is represented as the VMS relationship between a data item in the interface and multiple input data items connected by the auxiliary merging lines in the small function block. For example, if input data items a, b, and c in the small function block are connected by an auxiliary merging line, and input data items a, b, and c are extracted as data item m in the interface, the PFVMS will ultimately form information for three lines: (m, a), (m, b), and (m, c).
[1099] The XML representation of the PFVMS part is:
[1100]
[1101] In the XML of the above PFVMS part, a group of line tags represents the reference relationship of a data item; the path attribute of the source tag represents the first relative path of the data item in the large function interface area, and the path attribute of the destination tag represents the second relative path of the corresponding data item in the calculation sequence.
[1102] The JSON representation of the PFVMS part is:
[1103]
[1104] Figure 8D The XML representation of the PFVMS portion of the interface shown is as follows:
[1105]
[1106] Figure 7D A schematic diagram of a graphical expression of two function blocks provided in some embodiments of the present disclosure.
[1107] For example, the relationship description of the auxiliary merge link is expressed as extracting the first input data item in a group of data items storing the auxiliary merge link as an interface, then except for the first input data item, all other input data items are created with the first input data item. Figure 7D Function blocks PF20 and PF21 are shown. Function blocks PF20 and PF21 are organized to obtain a combined function block. Function block PF20 includes an input data item a20, and function block PF21 includes an input data item a21. Input data item a20 and input data item a21 are connected by an auxiliary merge line. At this time, the relationship of the auxiliary merge line is stored in the VMS part with the undirected attribute of the combined function block. The VMS part is shown as follows:
[1108]
[1109] After extracting the input data item a20 (i.e., the first input data item) in the function block PF20 as an interface, the PFVMS portion of the combined function block is updated. It is necessary to establish a corresponding relationship between the input data item a21 that has an auxiliary merge connection relationship with the input data item a20 and the input data item a20. For example, the interface portion corresponding to the above combined function block is represented as:
[1110] <in>
[1111] <type id=""name=""value=""typevalue="int2int"typeclass="1"typeid="">
[1112] <type id=""name=""value=""typevalue="int2"typeclass="1"typeid=""memory="1">
[1113] <type id=""name=""value=""typevalue="int"typeclass="0"typeid=""memory="1" / >
[1114] <type id=""name=""value=""typevalue="int"typeclass="0"typeid=""memory="1" / >
[1115]
[1116] <type id=""name=""value=""typevalue="int"typeclass="0"typeid=""memory="1" / >
[1117]
[1118] < / in>
[1119] <out>
[1120] <type id=""name=""value=""typevalue="intint"typeclass="1"typeid="">
[1121] <type id=""name=""value=""typevalue="int"typeclass="0"typeid=""memory="1" / >
[1122] <type id=""name=""value=""typevalue="int"typeclass="0"typeid=""memory="1" / >
[1123]
[1124] < / out>
[1125] The PFVMS part corresponding to the above combined function block is:
[1126]
[1127] It should be noted that after updating the PFVMS part corresponding to the combined function block, the VMS part with the undirected attribute needs to be deleted.
[1128] For example, Figure 7A As shown, step S56 includes: forming a combined function block of a sequence structure. Thus, after steps S50-S56, the combined function block of the sequence structure is organized and the complete structure of the combined function block of the sequence structure is generated. For example, the complete XML representation corresponding to the combined function block (a+b) / 2 is:
[1129]
[1130]
[1131] Figure 9A A schematic diagram of a combined function block of an if structure provided in some embodiments of the present disclosure; Figure 9B A schematic diagram of a method for combining function blocks based on the if combination paradigm provided in some embodiments of the present disclosure; Figure 9C A schematic diagram of a graphical expression of a combined function block of an if structure provided in some embodiments of the present disclosure.
[1132] For example, based on the if combination paradigm, at least two function blocks are combined to obtain a combined function block of the if structure, such as Figure 9A As shown, the conditional combination paradigm includes a judgment condition part exp, a first branch part doTrue, and a second branch part doFalse. The first branch part doTrue represents a branch when the result of the judgment condition of the judgment condition part exp is true, and the second branch part doFalse represents a branch when the result of the judgment condition of the judgment condition part exp is false. The judgment condition part exp includes at least one function block, the first branch part doTrue includes at least one function block, and the second branch part doFalse also includes at least one function block. It should be noted that in the combination function block of the conditional structure, one of the first branch part doTrue and the second branch part doFalse may be empty, that is, the first branch part doTrue or the second branch part doFalse may not include any function block.
[1133] For example, in the process of organizing the combination function blocks of the if structure, the structure template of the if combination paradigm is gradually filled with at least one function block.
[1134] The XML representation of the calculation sequence corresponding to the combined function block of any if structure is as follows:
[1135] <exp name="">
[1136] <F / PF id=""name="">
[1137] <in>
[1138] < / in>
[1139] <out>
[1140] < / out>
[1141]
[1142]
[1143] <doTrue name="">
[1144] <F / PF id=""name="">
[1145] <in>
[1146] < / in>
[1147] <out>
[1148] < / out>
[1149]
[1150]
[1151] <doFalse name="">
[1152] <F / PF id=""name="">
[1153] <in>
[1154] < / in>
[1155] <out>
[1156] < / out>
[1157]
[1158]
[1159] For example, the calculation sequence corresponding to the combined function block of the if structure includes: the judgment condition part exp, which is composed of <exp>< / exp> Structure representation; branch structure when the condition is true, that is, the first branch part doTrue, is represented by <dotrue>< / dotrue> Structure representation; branch structure when the condition is false, that is, the second branch part doFalse, is represented by <dofalse>< / dofalse> Structural representation. Figure 9A As shown, the exp part is connected to the first branch part doTrue and the second branch part doFalse through a two-choice module. When the output of the exp part is 1, the doTrue branch is executed; when the output of the exp part is 0, doFalse is executed.
[1160] For example, the relative addresses of the judgment condition part exp, the first branch part doTrue and the second branch part doFalse are 0, 1 and 2 respectively based on the encoding rules. The relative addresses of the function blocks in each part are encoded according to the serial numbers 0, 1, ... The above relative addresses and encoding rules are used to assist in explaining the positioning of the data items in the first relative path and the second relative path. In actual operation, the relative address attribute may not exist or be set. The composition of the structure itself represents the nested path where the data item is located, which can be automatically calculated by the algorithm according to the encoding rules. For example, the output data item of the function block of the judgment condition part exp is a data item of boolean type. When both the doTrue part and the doFalse part exist, the doTrue part includes at least one function block, and the doFalse part includes at least one function block. For example, the doTrue part or the doFalse part can be empty, that is, it does not include any function block.
[1161] For example, Figure 9B As shown, the method for combining function blocks based on the if combination paradigm includes steps S60-S66. Figure 9B As shown, step S60 includes: selecting an if combination paradigm.
[1162] For example, step S61 includes: selecting at least two function blocks and organizing a calculation sequence.
[1163] For example, for the three parts of the if structure (the judgment condition part exp, the first branch part doTrue, and the second branch part doFalse), at least one function block is selected from the function block library for each part as required (in the embodiment of the present disclosure, each part includes one function block as an example), and the selected function blocks are arranged based on the if combination paradigm to form a corresponding calculation sequence. The ID values of the data items in the calculation sequence composed of the selected function blocks can be concretized, that is, the ID values of the data items can be modified as required to make the calculation sequence easier to understand.
[1164] For example, after forming the calculation sequence, the data item can be attributed. Step S62 includes: constant setting. After organizing the calculation sequence, the data item can be constant-set as needed and set in the value attribute of the data item.
[1165] For example, in some embodiments, the function to be implemented is: compare the sizes of two int type data items (i.e., the first data item and the second data item), perform subtraction if the first data item is larger than the second data item, and perform addition if the first data item is smaller than the second data item. Based on this function, three function blocks are selected from the function block library, namely, the function block lessint (used to implement less than comparison) representing the less than relation expression, the addition function block expaddI, and the subtraction function block expsubI. Figure 9C As shown, based on the if combination paradigm, the function block lessint is set in the judgment condition part exp in the if structure, the first branch part doTrue when the condition in the if structure is true sets an addition function block expaddI and the second branch part doFalse when the condition is false sets a subtraction function block expsubI.
[1166] For example, Figure 9C The XML representation of the calculation sequence formed by the three function blocks shown is:
[1167] <exp name="">
[1168] <F id="lessint"name="">
[1169] <in>
[1170] <type id="int2"name=""value=""typeclass="1"typevalue="int2"typeid="">
[1171] <type id="int1"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1172] <type id="int2"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1173]
[1174] < / in>
[1175] <out>
[1176] <type id="boolean"name=""value=""typeclass="0"typevalue="boolean"typeid=""memory="1" / >
[1177] < / out>
[1178]
[1179]
[1180] <doTrue name="">
[1181] <F id="expaddI"name="">
[1182] <in>
[1183] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[1184] <type id="int3"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1185] <type id="int4"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1186]
[1187] < / in>
[1188] <out>
[1189] <type id="int5"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1190] < / out>
[1191]
[1192]
[1193] <doFalse name="">
[1194] <F id="expsubI"name="">
[1195] <in>
[1196] <type id=""name=""value=""typeclass="1"typevalue="int2"typeid="">
[1197] <type id="int3"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1198] <type id="int4"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1199]
[1200] < / in>
[1201] <out>
[1202] <type id="int6"name=""value=""typeclass="0"typevalue="int"typeid=""memory="1" / >
[1203] < / out>
[1204]
[1205]
[1206] For example, Figure 9B As shown, step S63 includes executing a connection operation to generate a VMS. In step S61, according to the calculation sequence, it is determined which data items (input data items and / or output data items) in the three function blocks can be connected through data transfer connections and / or auxiliary merging connections, that is, after obtaining the calculation sequence, the internal data items of the combination function blocks of the if structure can be connected according to the connection rules to generate the VMS corresponding to the combination function blocks of the if structure. For example, for the if combination paradigm, in the process of organizing the function blocks, there are auxiliary merging connections and data transfer connections connecting the output data items to the output data items, because the output part of the function block in the judgment condition part exp is used for judgment operation and does not participate in the connection operation. The output data items of the two branches of doTrue and doFalse will not exist at the same time, and the output data items of the same type can be connected by data transfer.
[1207] For example, in Figure 9C In the example shown, the connection relationship between data items is only an auxiliary merging connection relationship. However, the present disclosure is not limited to this. In the if structure, the connection relationship between data items can include data transfer connection relationships and / or auxiliary merging connection relationships. It should be noted that the specific connection rules of the connection operation can be referred to the relevant description of the connection rules above and will not be repeated here.
[1208] Figure 9D For Figure 9C The diagram shows a graphical representation of the data items in the combinatorial function block after they are connected.
[1209] For example, Figure 9D As shown, in the graphical expression, the input data items int3 and int4 of the addition function block expaddI in the doTrue branch are respectively connected to the input data items int3 and int4 of the subtraction function block expsubI in the dofalse branch through auxiliary merging lines, and the circles corresponding to the input data items of the subtraction function block expsubI in the doFalse branch become hollow circles.
[1210] For example, Figure 9D The VMS XML representation corresponding to the connection relationship shown is:
[1211] <VMS undirected=””>
[1212] <line>
[1213] <source path="1.0.in.0.0">
[1214] <destinationpath="2.0.in.0.0" / >
[1215] < / line>
[1216] <line>
[1217] <source path="1.0.in.0.1">
[1218] <destinationpath="2.0.in.0.1" / >
[1219] < / line>
[1220]
[1221] For example, in the XML expression of the VMS part, the source paths of the input data items int3 and int4 of the addition function block expaddI in the doTrue branch are the second relative paths of the input data items int3 and int4, namely 1.0.in.0.0 and 1.0.in.0.1, and the memory of the input data items int3 and int4 of the addition function block expaddI in the doTrue branch is both 1, that is, the input data items int3 and int4 of the addition function block expaddI in the doTrue branch are real storage; the destination paths of the input data items int3 and int4 of the subtraction function block expsubI in the doFalse branch are the second relative paths of the input data items int3 and int4, namely 2.0.in.0.0 and 2.0.in.0.1, and the memory of the input data items int3 and int4 of the subtraction function block expsubI in the doFalse branch is 0, that is, the input data items int3 and int4 of the subtraction function block expsubI in the doFalse branch are virtual storage.
[1222] For example, Figure 9B As shown, step S64 includes: generating an interface. The rules for generating the interface can refer to the above description of encapsulating at least two function blocks into a combined function block and generating an interface corresponding to the combined function block in step S13.
[1223] For example, the combination function block of the conditional structure may include data items of the XOR type. The XOR type is a combination data type generated by the combination function block of the if structure according to the interface extraction rule when forming the output interface.
[1224] The doTrue branch structure and the doFalse branch structure each contain a small function area (calculation sequence) of sequential paradigm. After the splicing operation is completed, it is assumed that the output of the doTrue branch extracts n output data items d1, d2, ... dn according to the extraction rule, the data categories of the n data items are tc1, tc2, ... tcn, and the data types are t1, t2, ... tn, where n>1, forming a data item d of a basic combined data type. It is assumed that the output of the doFalse branch extracts m output data items s1, s2, ... sm according to the extraction rule, and the m data items The data categories of the items are tcf1, tcf2, ... tcfm, and the data types are tf1, tf2, ... tfm, where m>1, forming a data item s of the basic combined data type. Then, the data items d and s are combined in an XOR manner to form an XOR type combined data item. The typeclass of this data item is 3, and the typevalue is the typevalue of the data item d and the typevalue of the data item s connected together with the XOR symbol. This data item contains the data items d and s. The XML description of this XOR type combined data item is as follows:
[1225] <type id=""name=""value=""typeclass="3"typevalue="t1t2...tnxortf1tf2...tfm"typeid="">
[1226] <type id="d"name=""value=""typeclass="1"typevalue="t1t2...tn"typeid="">
[1227] <type id=""name=""value=""typeclass="tc1"typevalue="t1"typeid="" / >
[1228] <type id=""name=""value=""typeclass="tc2"typevalue="t2"typeid="" / > ......
[1230] <type id=""name=""value=""typeclass="tcn"typevalue="tn"typeid="" / >
[1231]
[1232] <type id="s"name=""value=""typeclass="1"typevalue="tf1tf2...tfm"typeid="">
[1233] <type id=""name=""value=""typeclass="tcf1"typevalue="tf1"typeid="" / >
[1234] <type id=""name=""value=""typeclass="tcf2"typevalue="tf2"typeid="" / > ......
[1236] <type id=""name=""value=""typeclass="tcfm"typevalue="tfm"typeid="" / >
[1237]
[1238]
[1239] A graphical representation of an XOR type data item can be a solid circle (e.g., blue) with a '+' symbol inside. The XML representation of an XOR type data item is as follows:
[1240] <type id=""name=""value=""typeclass="3"typevalue="T1xorT2"typeid="">
[1241] <type id=""name=""value=""typeclass=""typevalue="T1"typeid="" / >
[1242] <type id=""name=""value=""typeclass=""typevalue="T2"typeid="" / >
[1243]
[1244] The naming convention for the typevalue of an XOR-type data item is to connect the data type attributes of the two data items in the XOR structure using the xor symbol. For example, T1xorT2 indicates that the data types T1 and T2 are XORed. The typeclass value of an XOR-type data item is 3.
[1245] The JSON representation of an XOR type data item is:
[1246] {
[1247] "id":"",
[1248] "name":"",
[1249] "value":"",
[1250] "typeclass":"3",
[1251] "typevalue":"T1xorT2",
[1252] "typeid":"",
[1253] "memory":"",
[1254] "children":[{
[1255] "id":"",
[1256] "name":"",
[1257] "value":"",
[1258] "typeclass":"",
[1259] "typevalue":"T1",
[1260] "typeid":"",
[1261] "memory":""
[1262] },{
[1263] "id":"",
[1264] "name":"",
[1265] "value":"",
[1266] "typeclass":"",
[1267] "typevalue":"T2",
[1268] "typeid":"",
[1269] "memory":""
[1270] }]
[1271] }
[1272] In the process of organizing the combination function block of the if structure, when the output part of the interface is finally formed, the data items are extracted according to the XOR interface extraction rule.
[1273] The generation rules of the interface of the combination function block of the conditional structure also include the following special extraction rules (including XOR structure extraction rules). For example, for the combination function block of the conditional structure, in step S13, at least two function blocks are encapsulated into a combination function block, and the generation of the interface corresponding to the combination function block also includes: not extracting the output data items of the function blocks belonging to the judgment condition part in the combination function block of the conditional structure as part of the interface corresponding to the combination function block of the conditional structure; in response to the combination function of the conditional structure including at least two input data items, the input data items of the interface corresponding to the function block belonging to the judgment condition part, the input data items of the interface corresponding to the function block in the first branch part, and the input data items of the interface corresponding to the function block in the second branch part are extracted as the input part of the combination function block of the conditional structure to form an input interface of a basic combination data type. The input data items of the interface corresponding to the combination function block of the conditional structure are The data catego...
Claims
1. A method for constructing a combined function block by nesting a combinational paradigm, applied to a function block library, the function block library comprising a plurality of function blocks, wherein: The method comprises: Selecting at least one combination paradigm from a plurality of combination paradigms; Obtaining an arrangement operation on at least two function blocks among the plurality of function blocks to obtain a calculation sequence; Based on the calculation sequence, performing a splicing operation to determine a connection relationship between the at least two function blocks; Based on the interface of each function block in the at least two function blocks and the connection relationship between the at least two function blocks, encapsulate the at least two function blocks into a combined function block, and generate an interface corresponding to the combined function block; Each of the plurality of function blocks includes at least one input data item and at least one output data item corresponding to an interface corresponding to the function block, and the at least one input data item and the at least one output data item exist in a stored form in the function block, The splicing operation comprises connecting at least part of the input data items and / or at least part of the output data items of the at least two function blocks; The multiple function blocks include multiple basic function blocks and multiple combined function blocks, each of the combined function blocks is composed of at least one basic function block and / or at least one combined function block, The multiple basic function blocks represent the smallest units constituting any combined function block; Each of the plurality of basic function blocks has its corresponding computing function, The computing function of each of the combined function blocks is determined based on the computing function and connection relationship of the at least one basic function block and / or the at least one combined function block; storing the combined function block as a function block in the function block library to expand the function block library; The multiple combination paradigms include a cyclic combination paradigm and a while-type cyclic combination paradigm; For each function block in the plurality of function blocks, the interface corresponding to the function block includes an input part and an output part, the input part of the interface corresponding to the function block corresponds to at least one input data item of the function block, and the output part of the interface corresponding to the function block corresponds to at least one output data item of the function block, The at least one input data item and the at least one output data item each include a data type attribute, a data category attribute, a storage type attribute, a value attribute, a name attribute, a physical address attribute, and a relative address attribute, The data category attributes include basic data types, combined data types, pointer types and generics, and the pointer types include general pointer types and non-general pointer types; The data type attribute refers to the type of the data item; The storage type attributes include virtual storage and real storage, The relative address attribute is used to represent the sequentially encoded value of the data item, For a data item whose data category attribute is the combined data type, the data item includes a plurality of data items whose data category attribute is the basic data type, or the data item includes a plurality of data items whose data category attribute is the combined data type, or the data item includes a plurality of data items whose data category attribute is the pointer type, or the data item includes a plurality of data items whose data category attribute is the generic type, or the data item includes data items whose data category attributes are at least two of the following data category attributes: the basic data type, the combined data type, the pointer type, and the generic type; The structural formats of the data items whose data category attributes are the basic data type, the data items whose data category attributes are the combined data type, the data items whose data category attributes are the pointer type, and the data items whose data category attributes are the generic type are the same and standardized, and the structure of the data items whose data category attributes are the combined data type is a nested structure, and the structural formats of the data items at each layer of the nested structure are the same; When the at least one combination paradigm includes at least one of the loop combination paradigm and the while-type loop combination paradigm, The loop combination paradigm includes a single expression and at least one layer of loop body, each loop body includes at least one loop part, and each loop part includes a conditional expression, an intermediate loop expression and an end loop expression; The when-type loop combination paradigm includes at least one layer of when-type loop body, each when-type loop body includes at least one when-type loop part, and each when-type loop part includes an when-type conditional expression and an when-type loop expression; When the at least one combination paradigm includes the loop combination paradigm, and each loop body includes multiple loop parts, the N-ization condition is: data items with the same position between the multiple loop parts are not connected; When the at least one combination paradigm includes the while-type loop combination paradigm, and each while-type loop body includes multiple while-type loop parts, the N-ization condition is that data items with the same position between the multiple while-type loop parts are not connected.
2. The method according to claim 1, wherein: The splicing operation is performed in the following order: combining the at least two function blocks according to at least one combination paradigm among multiple combination paradigms; connecting at least part of the input data items and / or at least part of the output data items of the at least two combined function blocks.
3. The method according to claim 1, wherein: The splicing operation is performed in the following order: connecting at least part of the input data items and / or at least part of the output data items of the at least two function blocks; combining the at least two function blocks after the data items are connected according to at least one combination paradigm among multiple combination paradigms.
4. The method according to claim 2 or 3, wherein: The multiple combination paradigms also include a sequential combination paradigm and a conditional combination paradigm; The condition combination paradigm includes a judgment condition part, a first branch part and a second branch part.
5. The method according to claim 4, wherein: The multiple basic function blocks include a basic function block representing a relational expression, a basic function block representing a logical expression, a basic function block representing an arithmetic expression, a basic function block representing an assignment expression, a basic function block representing a data type conversion function, and a paradigm basic function block. The paradigm basic function block includes a basic function block for pointer operations. The paradigm basic functions include a basic function block for obtaining the address of a data item, a basic function block for obtaining the data type value of a data item, and a basic function block for performing array operations.
6. The method according to claim 4, wherein: The splicing operation includes type matching rules and connection requirement rules. When connecting at least part of the input data items and / or at least part of the output data items of the at least two function blocks, the data type attributes of the two connected data items satisfy the type matching rule or the two connected data items satisfy the wiring requirement rule, the type matching rule is the matching of the data type attributes of the two data items, the wiring requirement rule includes that the data type attribute of one of the two data items is the generic type, and the other of the two data items is the basic data type, the combined data type or the generic type, or includes that the data type attribute of one of the two data items is the generic pointer type, and the data type attribute of the other of the two data items is the non-generic pointer type, Wherein, determining the two data items that satisfy the type matching rule includes: For the selected first data item and second data item in the at least part of the output data items and / or the at least part of the input data items: determining whether a data category attribute of the first data item and a data category attribute of the second data item are the same; in response to the data category attribute of the first data item and the data category attribute of the second data item being the same, determining whether the data category attribute of the first data item and the data category attribute of the second data item are the basic data type, the combined data type, the pointer type or the generic type; In response to the data category attribute of the first data item and the data category attribute of the second data item being the basic data type, it is determined whether the data type attribute of the first data item and the data type attribute of the second data item are the same; in response to the data type attribute of the first data item and the data type attribute of the second data item being the same, it is determined that the first data item and the second data item are the two data items that satisfy the type matching rule.
7. The method according to claim 6, wherein: The combined data types include basic combined data types, XOR types and array types. Determining two data items that satisfy the type matching rule also includes: In response to the data category attribute of the first data item and the data category attribute of the second data item being both combination data types, determining whether the data category attribute of the first data item and the data category attribute of the second data item are the XOR type, the basic combination data type, or the array type; In response to the data category attribute of the first data item and the data category attribute of the second data item being both of XOR type, cyclically performing judgment on the type matching rule on the data items at the same position of the first data item and the second data item to obtain a plurality of XOR judgment results, In response to each of the multiple XOR judgment results indicating that the type matching rule is satisfied, the first data item and the second data item are determined to be the two data items that satisfy the type matching rule.
8. The method according to claim 6, wherein: The combined data type includes an array type, and determining two data items that satisfy the type matching rule further includes: In response to the data category attribute of the first data item and the data category attribute of the second data item being both the array type, it is cyclically determined whether the data items at the same position of the first data item and the second data item satisfy the type matching rule to obtain at least one array judgment result; in response to each of the at least one array judgment result indicating that the type matching rule is satisfied, it is determined that the first data item and the second data item are the two data items that satisfy the type matching rule.
9. The method according to claim 6, wherein: The combined data type includes a basic combined data type, and determining two data items that satisfy the type matching rule further includes: In response to the data category attribute of the first data item and the data category attribute of the second data item both being the basic combination data type, cyclically determining whether data items at the same position of the first data item and the second data item satisfy the type matching rule to obtain at least one basic combination determination result, In response to each of the at least one basic combination judgment results indicating that the type matching rule is satisfied, the first data item and the second data item are determined to be the two data items that satisfy the type matching rule.
10. The method according to claim 6, wherein: Determining two data items that satisfy the type matching rule also includes: in response to the data category attribute of the first data item and the data category attribute of the second data item being both the pointer type, if the first data item and the second data item are both universal pointer types, determining that the first data item and the second data item are the two data items that satisfy the type matching rule; if the first data item and the second data item are both non-universal pointer types, cyclically determining whether data items at the same position of the first data item and the second data item satisfy the type matching rule to obtain at least one non-universal pointer determination result, and in response to each of the at least one non-universal pointer determination results indicating that the type matching rule is satisfied, determining that the first data item and the second data item are the two data items that satisfy the type matching rule; In response to the data category attribute of the first data item and the data category attribute of the second data item both being the generic type, it is determined that the first data item and the second data item are the two data items that satisfy the type matching rule.
11. The method according to claim 6, wherein: The at least part of the input data items comprises a first part of the input data items, Connecting at least part of the input data items and / or at least part of the output data items of the at least two function blocks comprises: Based on the type matching rule and / or the connection requirement rule, connecting the at least part of the output data items with the first part of the input data items through a data transfer connection, The data transfer line represents a line connecting an output data item to an input data item or an output data item, and the data transfer line includes an output-output transfer line and an output-input transfer line, the output-output transfer line is used to connect at least two output data items, and the output-input transfer line is used to connect at least one output data item to at least one input data item.
12. The method according to claim 11, wherein: The at least part of the output data items includes a first output data item, a second output data item and a third output data item, the first part of the input data items includes a first input data item, Connecting the at least part of the output data items and the first part of the input data items through a data transfer line comprises at least one of the following: Connecting the second output data item to the first output data item through the output-output transfer line, the second output data item appears after the first output data item, setting the storage type attribute of the second output data item to virtual storage, not changing the storage type attribute of the first output data item, and recording the connection relationship between the first output data item and the second output data item; connecting the third output data item to the first input data item via the input-output transfer line; In response to the third output data item appearing after the first input data item or the third output data item and the first input data item belonging to the same function block, setting the storage type attribute of the third output data item to virtual storage, not changing the storage type attribute of the first input data item, and recording the connection relationship between the first input data item and the third output data item, In response to the third output data item appearing before the first input data item, setting the storage type attribute of the first input data item to virtual storage, not changing the storage type attribute of the third output data item, and recording the connection relationship between the first input data item and the third output data item, wherein the first output data item, the second output data item, the third output data item and the first input data item are located in the form of a second relative path, The connection relationship between the first output data item and the second output data item is reflected by the second relative path between the first output data item and the second output data item, and is recorded in the connection relationship part of the selected combination paradigm. The connection relationship between the first input data item and the third output data item is embodied by a second relative path between the first input data item and the third output data item.
13. The method according to claim 11, wherein: The at least part of the input data items also includes a second part of the input data items, Connecting at least part of the input data items and / or at least part of the output data items of the at least two function blocks further comprises: Based on the type matching rule and / or the connection requirement rule, connecting the second part of input data items through an auxiliary merging connection; The second part of input data items includes a second input data item and a third input data item, Connecting the second part of input data items through the auxiliary merge line includes: connecting the third input data item to the second input data item through the auxiliary merge line, setting the storage type attribute of the third input data item to virtual storage, not changing the storage type attribute of the second input data item, and recording the connection relationship between the second input data item and the third input data item, Among them, the second input data item and the third input data item are located in the form of a second relative path, and the connection relationship between the second input data item and the third input data item is reflected through the second relative path of the second input data item and the third input data item, and recorded in the interface and sequence comparison part of the selected combination paradigm.
14. The method according to claim 13, wherein: For the first pointer data item and the second pointer data item in the at least part of the input data items and / or the at least part of the output data items, the data type attribute of the first pointer data item is the universal pointer type, and the second pointer data item is the non-universal pointer type, In response to the first pointer data item and the second pointer data item being connected via the data transfer line or the auxiliary merging line, the data type attribute of the first pointer data item is set to the data type attribute of the data item pointed to by the second pointer data item.
15. The method according to claim 6, wherein: The interface corresponding to each function block in the plurality of function blocks includes an input part and an output part. Encapsulating the at least two function blocks into a combined function block, and generating an interface corresponding to the combined function block, including: Combining and encapsulating at least one input data item extracted as an interface corresponding to the combined function block to obtain an input part of the interface corresponding to the combined function block; Combining and encapsulating at least one output data item extracted as an interface corresponding to the combined function block to obtain an output part of the interface corresponding to the combined function block; The interface corresponding to the combinational function block is stored in the interface part of the selected combinational paradigm.
16. The method according to claim 15, wherein: Encapsulating the at least two function blocks into a combined function block, and generating an interface corresponding to the combined function block further includes at least one of the following: For any function block among the at least two function blocks, when the data type attribute of any input data item or output data item corresponding to the any function block is a combined data type, if a certain data item among the any input data item or output data item of the combined data type is not extracted as a part of the interface corresponding to the combined function block, the any input data item or output data item is scattered, the certain data item is not extracted, and the remaining data items among the any input data item or output data item are recombined as a part of the interface corresponding to the combined function; For any function block of the at least two function blocks, when any input data item corresponding to the any function block is a constant data item, the any input data item is not extracted as a part of the interface corresponding to the combined function block; For the input data items corresponding to the at least two function blocks, the input data items whose storage type attribute is virtual storage are not extracted as part of the interface corresponding to the combined function block; For any output data item corresponding to the at least two function blocks, in response to the fact that the any output data item is directly or indirectly connected to at least one output data item through a data transmission line, the output data item that appears first between the any output data item and the at least one output data item is obtained as the output data item to be extracted; in the case where the output data item to be extracted is connected to any input data item, if the output data item to be extracted appears before the any input data item, the output data item to be extracted is not extracted as a part of the interface corresponding to the combined function block; if the output data item to be extracted appears after the any input data item or the output data item to be extracted and the any input data item belong to the same function block, the output data item to be extracted is extracted as a part of the interface corresponding to the combined function block, and some data items of the output data items corresponding to the at least two function blocks that have not been extracted as interfaces are extracted as interfaces as required; For the output data items corresponding to the at least two function blocks, all the output data items corresponding to the at least two function blocks are extracted as the interface corresponding to the combined function block.
17. The method according to claim 16, wherein: When the at least one combinational paradigm is the sequential combinational paradigm, the combinational function block is a combinational function block of sequential structure, the at least two function blocks are encapsulated as a combinational function block, and in the process of generating an interface combination corresponding to the combinational function block, the data items in the interface corresponding to the combinational function block are generated in sequence from the data items in the interfaces corresponding to the at least two function blocks, and the data category attribute of the data items in the interface corresponding to the combinational function block is a basic combination data type.
18. The method according to claim 17, wherein: When the at least one combination paradigm is the conditional combination paradigm, the combination function block is a combination function block of a conditional structure, For the combined function block of the conditional structure, encapsulating the at least two function blocks into a combined function block, and generating an interface corresponding to the combined function block further includes: not extracting the output data items of the function blocks belonging to the judgment condition part in the combined function blocks of the conditional structure as a part of the interface corresponding to the combined function blocks of the conditional structure; In response to the combination function of the conditional structure including at least two input data items, the input data items of the interface corresponding to the function block belonging to the judgment condition part, the input data items of the interface corresponding to the function block in the first branch part, and the input data items of the interface corresponding to the function block in the second branch part are extracted as the input part of the interface corresponding to the combination function block of the conditional structure, and the data category attribute of the input part of the interface corresponding to the combination function block of the conditional structure is a basic combination data type; The combinatorial function responsive to the conditional structure includes at least two output data items, the at least two output data items have an XOR structure, the at least two output data items include a first output XOR part belonging to a function block in the first branch part and a second output XOR part belonging to a function block in the second branch part, In the case where some data items in any one of the at least two output data items are connected by the data transfer line, extracting some data items in any one of the output data items as the common output part of the combination function block of the conditional structure, In the case where all output data items of the first output XOR part of the at least two output data items are extracted as the common output part, all output data items of the first output XOR part are not taken as part of the XOR structure, and other output data items of the second output XOR part except those extracted as the common output part are taken separately as part of the XOR structure.
19. The method according to claim 18, wherein: When the at least one combinational paradigm is the loop combinational paradigm, the combinational function block is a combinational function block of a loop structure, and each loop body includes a plurality of loop parts, For the combined function block of the loop structure, encapsulating the at least two function blocks into a combined function block, and generating an interface corresponding to the combined function block further includes: No interface corresponding to the output data items of the function blocks located in the single expression, the conditional expression of each loop part and the end loop expression in the combined function block of the loop structure is provided; For any input data item in the combinatorial function block of the loop structure, if the input data item in some loop parts among the multiple loop parts is connected by wires, and the input data item in other loop parts among the multiple loop parts is not connected by wires, providing interfaces corresponding to the input data items whose storage attributes of the multiple input data items corresponding to the multiple loop parts are real storage; For any output data item in the combinatorial function block of the loop structure, if the any output data item in some loop parts among the multiple loop parts is connected by wires, and the any output data item in other loop parts among the multiple loop parts is not connected by wires, only the any output data item in the first loop part among the multiple loop parts is provided as a corresponding interface or multiple any output data items in the multiple loop parts are subjected to N-based extraction; When the at least one combinational paradigm is the when-type loop combinational paradigm, the combinational function block is a combinational function block of an when-type loop structure, and each when-type loop body includes a plurality of when-type loop parts, For the combined function block of the while loop structure, encapsulating the at least two function blocks into a combined function block, and generating an interface corresponding to the combined function block further includes: Not providing an interface corresponding to an output data item of a function block in the while-type conditional expression in the combinational function block of the while-type loop structure; For any input data item in the combinatorial function block of the while type loop structure, if the input data item in some of the plurality of while type loop parts is connected by wires, and the input data item in other of the plurality of while type loop parts is not connected by wires, providing interfaces corresponding to the input data items whose storage attributes of the plurality of input data items corresponding to the plurality of while type loop parts are real storage; For any output data item in the combinatorial function block of the when-type loop structure, if the any output data item in some of the multiple when-type loop parts is connected by wires, and the any output data item in other of the multiple when-type loop parts is not connected by wires, only the any output data item in the first layer of the multiple when-type loop parts is provided as a corresponding interface or multiple any output data items in the multiple when-type loop parts are subjected to N-based extraction; The data category attribute of the data item in the interface corresponding to the combined function block of the loop structure or the while-type loop structure is an array type.
20. The method according to claim 1, wherein: Each of the plurality of function blocks is presented in a graphical form, the graphical form corresponds to a symbolic language, and the symbolic language includes an extensible markup language.
21. The method according to claim 20, wherein: The extensible markup language corresponding to any function block in the plurality of function blocks includes a calculation sequence part, an interface part, a connection relationship part and an interface and sequence comparison part. The calculation sequence part is used to describe the interface of the function block included in any one of the function blocks; The interface part is used to describe the interface of any function block; The connection relationship part is used to describe the data transfer relationship and input merging relationship between the function blocks included in any one of the function blocks; The interface and sequence comparison part is used to describe the comparison relationship between the data items in the function blocks included in any function block and the data items in the interface of any function block, and also describes the connection relationship between the input data items connected by the auxiliary merging connection in any function block, The control relationship is embodied by a first relative path and a second relative path of a data item in an interface of any function block.
22. The method according to claim 21, in, For any input data item corresponding to any function block of the at least two function blocks, the any input data item is extracted as a part of the interface corresponding to the combined function block, Any of the input data items corresponds to a first relative path, and the first relative path of any of the input data items represents a relative path of any of the input data items in the input part of the interface corresponding to the combination function block, The first relative path of any input data item is expressed as follows: in.Path(data_in1) Wherein, in indicates that any one of the input data items is in the input part of the interface corresponding to the combinational function block; Path(data_in1) is the relative path of any one of the input data items calculated in the following manner: based on the splicing structure of the combination function block, between the outermost input data item corresponding to any one of the input data items of the input part of the interface corresponding to the combination function block and the any one of the input data items, the relative address attribute related to the any one of the input data items is obtained layer by layer, and the relative path of the any one of the input data items is calculated according to the relative address attribute related to the any one of the input data items; Wherein, for any output data item corresponding to any function block, the any output data item is extracted as a part of the interface corresponding to the combined function block, Any output data item corresponds to a first relative path, and the first relative path of any output data item represents a relative path of any output data item in the output part of the interface corresponding to the combination function block, The first relative path of any output data item is expressed as follows: out.Path(data_out1) Wherein, out indicates that any output data item is in the output part of the interface corresponding to the combination function block; Path(data_out1) is the relative path of any one of the output data items calculated in the following manner: based on the splicing structure of the combination function block, between the outermost output data item corresponding to any one of the output data items of the output part of the interface corresponding to the combination function block and the any one of the output data items, the relative address attributes related to the any one of the output data items are obtained layer by layer, and the relative path of the any one of the output data items is calculated based on the relative address attributes related to the any one of the output data items.
23. The method according to claim 12 or 13, in, For any input data item in the interface corresponding to any function block of the at least two function blocks, the any input data item corresponds to a second relative path, and the second relative path of the any input data item represents the relative path of the any input data item in the combined function block. The second relative path of the any input data item is expressed as: Path(PF).in.Path(data_in2) Wherein, Path(PF) is the relative path of any function block in the combined function block calculated in the following manner: based on the splicing structure of the combined function block, between the outermost function block of the combined function block corresponding to any function block and the any function block, the relative address attribute related to the any function block is obtained layer by layer, and the relative path of the any function block is calculated according to the relative address attribute related to the any function block; in indicates that any input data item is in the input part of the interface corresponding to any function block, Path(data_in2) is the relative path of any one of the input data items in the input part of the interface corresponding to any one of the function blocks, calculated in the following manner: between the outermost input data item corresponding to any one of the input data items in the input part of the interface corresponding to any one of the function blocks and the any one of the input data items, the relative address attribute related to the any one of the input data items is obtained layer by layer, and the relative path of the any one of the input data items is calculated according to the relative address attribute related to the any one of the input data items; Among them, for any output data item in the interface corresponding to any function block, any output data item corresponds to a second relative path, and the second relative path of any output data item represents the relative path of any output data item in the combined function block, and the second relative path of any output data item is expressed as: Path(PF).out.Path(data_out2) Wherein, out indicates that any output data item is in the output part of the interface corresponding to any function block, Path(data_out2) is the relative path of any one of the output data items in the output part of the interface corresponding to any one of the function blocks, calculated in the following manner: between the outermost output data item corresponding to any one of the output data items in the output part of the interface corresponding to any one of the function blocks to the any one of the output data items, the relative address attributes related to any one of the output data items are obtained layer by layer, and the relative path of any one of the output data items is calculated based on the relative address attributes related to any one of the output data items.
24. The method according to any one of claims 1 to 3, wherein: The at least one input data item and the at least one output data item do not need to be assigned a variable name.
25. The method according to claim 5, further comprising: selecting at least one basic function block representing the assignment expression and at least one basic function block representing the relational expression from the basic function blocks as the at least two function blocks, Combining the at least two function blocks according to at least one combination paradigm among the multiple combination paradigms comprises: Selecting at least one of the sequential combination paradigm, the conditional combination paradigm, and the while-type loop combination paradigm as the at least one combination paradigm; The at least two function blocks are combined according to the at least one combination paradigm.
26. The method according to claim 25, wherein: When the extensible markup language corresponding to each basic function block is compiled into a high-level language, the name attribute is compiled into a variable name in the high-level language.
27. A device for constructing a combinational function block, comprising: a memory for non-transitory storage of computer readable instructions; A processor is used to execute the computer-readable instructions, wherein the computer-readable instructions implement the method according to any one of claims 1 to 26 when executed by the processor.
28. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 26 is implemented.
