Data type reassignment

DE112016002491B4Active Publication Date: 2025-03-20MATHWORKS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE112016002491
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2016-06-01
Filing Date
2016-06-02
Publication Date
2025-03-20
Estimated Expiration
2036-06-02

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A device can receive input code containing one or more input objects. The input code can be used in conjunction with the generation of output code. When generated, the output code can contain one or more output objects corresponding to and different from the one or more input objects. The device can receive or determine conversion information that identifies a conversion operation to be performed in order to generate the one or more output objects based on the one or more input objects. The conversion information can be received separately from the input code. Based on the conversion information and the input code, the device can generate an intermediate representation.The intermediate representation can include one or more annotations corresponding to the one or more input objects and defining the conversion process. Based on the intermediate representation, the device can compile the output code. The device can then execute or provide the output code.
Need to check novelty before this filing date? Find Prior Art

Description

Short caption of the drawings Fig. 1A and Fig. 1B are diagrams of an overview of an exemplary implementation described here; Fig. 2 is a diagram of an example environment in which systems and / or methods described herein may be implemented; Fig. 3 is a diagram of example components of one or more devices of Fig. 2; Fig. 4A-4D are diagrams of an example implementation of the conversion of variable data types into program code; and Fig. Figure 5 is a flowchart of an example process for remapping data types for program code. Detailed description

[0001] The following detailed description of exemplary implementations refers to the accompanying drawings. The same reference numerals in different drawings may refer to the same or similar elements.

[0002] Program code may include a variety of variables. Each variable in the variety of variables may be associated with a data type that specifies a size and / or layout of memory used, for example, to store a value associated with the variable. For example, the data type may include a floating-point data type, such as a double-precision data type, a single-precision data type, or the like. As another example, the data type may include an integer data type, such as a signed integer data type (e.g., associated with a specific amount of memory, such as 8 bits, 16 bits, 32 bits, 64 bits, etc.), an unsigned integer data type (e.g., associated with a specific amount of memory, such as 8 bits, 16 bits, 32 bits, 64 bits, etc.), or the like. In some programming environments, a variable can be assigned to a standard data type.For example, in a particular programming environment, a newly created variable may be assigned a double-precision data type by default.

[0003] Certain data types may be preferred in certain situations. For example, a device may save processor power, memory space, etc., by associating a single-precision data type with a particular variable, compared to associating a double-precision data type with that particular variable. As another example, a hardware component (e.g., a processor, etc.) may adapt to process variable values ​​of a single-precision data type and may not adapt to process variable values ​​of a double-precision data type. Therefore, a device may benefit from remapping a variable of a first data type to a second data type.

[0004] However, variables of different data types may be processed in different ways, which may lead to difficulties in remapping the variables' data types. Implementations described here may enable a device to remap a variable of a first data type in input code to a second data type in output code in a manner that does not require the user to manually create program code including the second data type. To remap the variable's data type, the device may associate an annotation describing the second data type with the variable in an intermediate representation generated based on the input code. In this way, a device hosting a programming environment saves processing power and improves efficiency by remapping data types.

[0005] Implementations described here may enable the device to modify other aspects of the input code by leveraging annotations in the intermediate representation. For example, an annotation may identify an operation that can be replaced in the output code with another operation in the input code. As another example, the device may use annotations to iteratively test output code. For example, a particular annotation may cause the device to select a data type for a variable based on information stored at one location, and the device may update the information for multiple executions of the output code to test different data types. In this way, the device enables iterative testing of output code using different data types, conserving processor and memory resources otherwise used to execute code with suboptimal data types.

[0006] In some implementations, an annotation may be specified and / or applied before or after the creation of the intermediate representation (i.e., before or after inference). Furthermore, an annotation may be applied to an object at any hierarchy level of a program (e.g., a data type, a local variable, a global variable, a temporary variable, a function, an expression, a line of code, a subroutine, a program, etc.). For example, an annotation may be specified at any hierarchy level, and the annotation may have an effect at other hierarchy levels and / or in other sections of the program code (e.g., based on a change to a variable data type, a change to a function, a change to a variable value, etc.).

[0007] Furthermore, an annotation can be specified per instruction and does not need to be hard-coded into the program code. Thus, the implementations described here enable manipulation of the program code at various levels of abstraction based on annotations applied in the intermediate representation and / or the output code. These annotations can be specified in the input code, or specified "on the fly" based on the receipt of an instruction or based on another annotation in the intermediate representation. Fig. 1A and Fig. 1B are diagrams of an overview of an exemplary implementation 100 described herein. Fig. Figure 1A shows an example of generating output code based on input code without converting data types of variables included in the input code. As in Fig. 1A and represented by reference numeral 110, a client device may receive input code (e.g., based on user input, based on obtaining the input code from memory, etc.). The input code specifies operations (e.g., operation 1, operation 2, operation 3, etc.) associated with variables (e.g., input variables and output variables). Here, each variable is associated with one of two data types: a single-precision data type (e.g., associated with 32-bit memory locations) or a double-precision data type (e.g., associated with 64-bit memory locations). In some implementations, the variables may be associated with other data types, such as a quadruple-precision data type (e.g., associated with 128-bit memory locations), a data type associated with 40-bit memory locations, an integer data type, or the like.

[0008] As shown by reference numeral 120, the client device may generate output code based on the input code. In some implementations, the output code may be in a different programming language than the input code. Here, for example, the output code is in C programming language. Assume that the input code is in a programming language associated with a programming environment executing on the client device. In other cases, the output code may be in the same programming language as the input code, may be in multiple, different programming languages, or the like. As shown, the output code includes variables with the same data type as variables included in the input code. For example, in the output code, two inputs to operation 1 are associated with double-precision data types, and one output from operation 1 is associated with a single-precision data type, as in the input code.

[0009] However, if the C programming language is not adapted to handle certain data types (e.g., if a particular library used to generate the output code does not contain functions configured for the specific data types), the output code may produce unexpected and / or inaccurate results when executed. Furthermore, a user may want to generate multiple, different iterations of the output code with variables of different data types (e.g., for quality assurance, etc.) and / or in different programming languages ​​(e.g., which may not be adapted for variables of specific data types) without manually generating code with variables of different data types and / or in different programming languages.

[0010] Fig. Figure 1B shows an example of generating output code in multiple, different programming languages ​​with specified variable data types. As in Fig. 1B and represented by reference numeral 130, the client device receives input code (e.g., the same input code as in connection with Fig. 1A). As represented by reference numeral 140, the client device determines to perform variable data type conversion to convert double-precision variables in the input code to single-precision variables in the output code. Suppose that the client device receives an instruction to cause the client device to perform variable data type conversion, and suppose that the instruction identifies the target programming languages ​​of C and Hardware Design Language (HDL) for the output code.

[0011] As represented by reference numeral 150, the client device generates output code with a single-precision data type and determines diagnostic information related to the conversion process. For example, the client device may generate an intermediate representation based on the input code and the conversion operations to be performed on the input code, and may generate the output code based on annotations corresponding to the conversion operations in the intermediate representation, as explained in more detail elsewhere.

[0012] As represented by reference numeral 160, the client device may generate output code in the C programming language. As shown, the client device may generate the output code to include variables of a single-precision data type. In some cases, the client device may replace operations (e.g., some or all of operations 1 through 3) with other operations to generate the output code. For example, if an operation in the target programming language (e.g., C) is incompatible with the single-precision data type, the client device may replace the operation with an operation that is compatible (e.g., from another library associated with the target programming language, etc.).

[0013] As represented by reference numeral 170, the client device can generate output code in HDL. By converting the double-precision data type variables of the input code to single-precision data type variables, the client device can generate the HDL code, thus saving processor resources and programming time otherwise used to convert the double-precision data type variables to single-precision data type variables. For example, a processor may execute HDL code and may not be able to process double-precision data type variables. In this way, the client device enables the generation of the HDL program in a manner that the processor can execute.

[0014] As represented by reference numeral 180, the client device may generate diagnostic messages based on the generation of the output code. Here, the client device provides a diagnostic message indicating that the output code (e.g., the C language output code identified by reference numeral 160) likely contains errors because it uses a C89 library (e.g., the American National Standards Institute (ANSI) 1989 library) to generate output code with single-precision variables. As also shown, the client device suggests using a C99 library (e.g., the ISO / IEC 9899:1999 C programming language standard) configured for single-precision data types to generate the output code.In this way, the client device saves processor resources and reduces errors associated with generating output code, as well as saving user time and resources that would otherwise be used to generate output code with single-precision variables.

[0015] The implementations described here are described with reference to textual programming languages. However, the implementations described here are not limited to textual programming languages ​​and can also be applied to other programming language types (e.g., graphical programming languages, etc.).

[0016] Fig. 2 is a diagram of an example environment 200 in which systems and / or methods described herein may be implemented. As in Fig. As shown in Figure 2, the environment 200 may include a client device 210, which may include a technical computing environment (TCE) 220. The environment 200 may also include a server device 230, which may include the TCE 220, and a network 240. Devices of the environment 200 may be interconnected via wired connections, wireless connections, or a combination of wired and wireless connections.

[0017] Client device 210 may include one or more devices capable of receiving, generating, storing, processing, and / or providing program code and / or information associated with program code. For example, client device 210 may include a computing device, such as a desktop computer, a laptop, a tablet, a mobile phone (e.g., a smartphone, a radiotelephone, etc.), or a similar device. In some implementations, client device 210 may receive information from and / or send information to server device 230.

[0018] The client device 210 may host the TCE 220. The TCE 220 may include any hardware-based component or a combination of hardware and software-based components that provide a computing environment with which tasks related to disciplines such as, but not limited to, mathematics, science, engineering, medicine, and business can be performed (e.g., by users). The TCE 220 may include a text-based environment (e.g., MATLABO software from TheMathWorks, Inc.), a graphics-based environment (e.g., Simulink® software, Stateflow® software, SimEvents® software, etc., from TheMathWorks, Inc.; VisSim from Visual Solutions; LabVIEW® from National Instruments; Agilent VEE from Agilent Technologies; Advanced Design System (ADS) from Agilent Technologies; Agilent Ptolemy from Agilent Technologies; etc.), or another type of environment, such asa hybrid environment, which may include, for example, a text-based environment and a graphics-based environment. In some implementations, the TCE 220 may include a user interface for providing information to a user and / or receiving information from the user (e.g., program code, diagnostic messages, user interactions, etc.). The server device 230 may include one or more devices capable of receiving, generating, storing, processing, and / or providing program code and / or information associated with program code. For example, the server device 230 may include a computing device, such as a server, a desktop computer, a laptop, a tablet, or a similar device. In some implementations, the server device 230 may host the TCE 220.In some implementations, client device 210 may be used to access one or more TCEs 220 running on one or more server devices 230. For example, multiple server devices 230 may be used to execute program code (e.g., in series or in parallel) and may provide corresponding results of executing the program code to client device 210.

[0019] In some implementations, client device 210 and server device 230 may be owned by different functional entities. For example, an end user may own client device 210 and a third party may own server device 230. In some implementations, server device 230 may include a device operating in a cloud computing environment. In this way, front-end applications (e.g., a user interface) may be separated from back-end applications (e.g., program code execution). Additionally or alternatively, server device 230 may perform one, some, or all of the operations described in this document as performed by client device 210.

[0020] Network 240 may include one or more wired and / or wireless networks. For example, network 240 may include a cellular network, a Public Land Mobile Network (PLMN), a Local Area Network (LAN), a Wide Area Network (WAN), a Metropolitan Area Network (MAN), a telephone network (e.g., the Public Switched Telephone Network (PSTN)), an ad hoc network, an intranet, the Internet, a fiber-based network, a private network, a cloud computing network, and / or a combination of these or other network types.

[0021] The number and arrangement of the Fig. The devices and networks shown in Figure 2 are given as an example. In practice, there may be additional devices and / or networks, fewer devices and / or networks, different devices and / or networks, or differently arranged devices and / or networks than those shown in Fig. 2. In addition, two or more in Fig. 2 shown devices are implemented in a single device, or a Fig. 2 may be implemented as multiple, distributed devices. Additionally or alternatively, a set of devices (e.g., one or more devices) of environment 200 may perform one or more functions described as being performed by another set of devices of environment 200.

[0022] Fig. 3 is a diagram of example components of a device 300. The device 300 may correspond to the client device 210 and / or server device 230. In some implementations, the client device 210 and / or server device 230 may include one or more devices 300 and / or one or more components of the device 300. As shown in Fig. 3, the device 300 may include a bus 310, a processor 320, a memory 330, a storage component 340, an input component 350, an output component 360, and a communication interface 370.

[0023] Bus 310 may include a component that allows communication among the components of device 300. Processor 320 is implemented in hardware, firmware, or a combination of hardware and software. Processor 320 may include a processor (e.g., a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), etc.), a microprocessor, and / or any processing component (e.g., a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc.) that interprets and / or executes instructions. In some implementations, processor 320 may include random-access memory (RAM), read-only memory (ROM), and / or other types of dynamic or static storage devices (e.g., flash memory, magnetic memory, optical memory, etc.) that store information and / or instructions for use by processor 320.

[0024] The storage component 340 may store information and / or software related to the operation and use of the device 300. For example, the storage component 340 may include a hard disk (e.g., a magnetic disk storage device, an optical disk, a magneto-optical disk, a solid-state disk, etc.), a compact disc (CD), a digital versatile disc (DVD), a floppy disk, a continuous tape cartridge, a magnetic tape, and / or another type of computer-readable medium along with a corresponding drive. In some implementations, the storage component 340 may store the TCE 220.

[0025] Input component 350 may include a component that allows device 300 to receive information, such as via user input (e.g., a touchscreen display, a keyboard, a numeric keypad, a mouse, a button, a switch, a microphone, etc.). Additionally or alternatively, input component 350 may include a sensor for detecting information (e.g., a Global Positioning System (GPS) component, an accelerometer, a gyroscope, an actuator, etc.). Output component 360 may include a component that provides output information from device 300 (e.g., a display, a speaker, one or more light-emitting diodes (LEDs), etc.).

[0026] The communication interface 370 may include a transceiver-like component (e.g., a transceiver, a separate receiver and transmitter, etc.) that enables the device 300 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. The communication interface 370 may allow the device 300 to receive information from and / or provide information to another device. For example, the communication interface 370 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a WLAN interface, a cellular network interface, or the like.

[0027] Device 300 may perform one or more processes described herein. Device 300 may perform these processes in response to processor 320 executing software instructions stored by a non-transitory computer-readable medium, such as memory 330 and / or storage component 340. A computer-readable medium is defined herein as a non-transitory storage device. A storage device includes storage space within a single tangible storage device or storage space distributed across multiple tangible storage devices.

[0028] The software instructions may be read into memory 330 and / or storage component 340 from the non-transitory computer-readable medium or from another device via a communication interface 370. When executed, software instructions stored in memory 330 and / or storage component 340 may cause processor 320 to perform one or more processes described herein. Additionally or alternatively, hard-wired circuitry may be used instead of, or in combination with, software instructions to perform one or more processes described herein. Therefore, implementations described herein are not limited to any particular combination of hard-wired circuitry and software.

[0029] The number and arrangement of the Fig. The components shown in Figure 3 are given as an example. In practice, the device may include additional components, fewer components, different components, or differently arranged components than those shown in Fig. 3. Additionally or alternatively, a set of components (ie, one or more components) of device 300 may perform one or more functions described as being performed by another set of components of device 300.

[0030] Fig. 4A-4D are diagrams of example implementations 400 of converting variable data types into program code.

[0031] As in Fig. As shown in Figure 4A, the client device 210 (e.g., TCE 220) can receive input code. Here, the input code defines a function of mlhdlc_sfir. As represented by reference numeral 405, the function receives inputs corresponding to input variables of x_in, h_in1, h_in2, h_in3, and h_in4. As further shown, the function outputs values ​​corresponding to variables of y_out and delayed_xout. As represented by reference numeral 410, the function declares and initializes variables from ud1 to ud8 and assigns values ​​of 0 to the variables if the variables are not yet associated with any value. Assume that the TCE 220 assigns double-precision data types to initialized variables by default. Thus, each of the variables ud1 to ud8 is assigned double-precision data types. As also shown, the function performs procedures using the variables ud1 to ud8 and the input variables.

[0032] As represented by reference numeral 415, the client device 210 may receive an instruction (e.g., codegen) to generate output code based on the input code of mlhdlc_sfir. As shown, the codegen instruction includes arguments of {0, 0, 0, 0, 0}. The arguments cause the client device 210 to generate output code using integer data types for x_in, h_in1, h_in2, h_in3, and h_in4. As also shown, the codegen instruction includes an argument of -singleC. Here, the argument of -singleC is conversion information indicating to convert variables of the input code to the single-precision data type in the C programming language. For example, the client device 210 may store information associating arguments with conversion information. As another example, the client device 210 may determine the conversion information based on the syntax of the argument of -singleC.For example, based on the argument containing a string of "single," the client device 210 may determine that variables of the input code should be converted to the single-precision data type, and based on the argument containing a value of "C," the client device 210 may determine that variables of the input code should be converted to the C programming language. Based on the argument of -singleC, the client device 210 may generate output code in the C programming language using single-precision data types for variables in the output code.

[0033] Fig. Figure 4B shows an example of a portion of an intermediate representation generated based on the input code and the Fig. 4A. The client device 210 may use the intermediate representation to generate output code. For example, the intermediate representation may be a representation of the input code (e.g., a structure of the input code, an abstract syntax tree generated based on the input code, a translation of the input code into another programming language, etc.) that the client device 210 or another device uses to generate output code. By generating an intermediate representation based on the input code, the client device 210 simplifies the generation of the output code, thereby conserving processor resources. For example, using an intermediate representation to generate output code increases the uniformity of information used to generate the output code, thereby increasing the variety of programs, devices, etc. that can generate output code.

[0034] As in Fig. 4B and shown by reference numeral 420, the intermediate representation may include annotations (e.g., %ud1 = $annotatex($0);, etc.) that correspond to variables in the input code. The client device 210 may insert an annotation corresponding to a variable in the intermediate representation based on the conversion information associated with the variable. Since the Fig. 4A, to generate output code with single-precision variables, the client device 210 inserts annotations corresponding to the variables of ud1, ud2, and the like. In some implementations, the client device 210 may insert annotations for other variables of the input code (e.g., x_in, h_in1, h_in2, h_in3, h_in4, etc.) (not shown).

[0035] The annotation may cause the client device 210 to generate output code that includes variables of the single-precision data type. For example, the annotation may include information that causes the client device 210, when the annotation is parsed, to generate the output code using single-precision data types. Here, the annotation includes "($0)", which causes the client device 210 to generate output code using single-precision data types. Thus, by utilizing the intermediate representation and the annotation, the client device 210 may generate output code for the input code in several different programming languages.

[0036] Fig. Figure 4C shows an example of output code in the C programming language that can be generated based on the intermediate representation, including the annotations. As in Fig. 4C and shown by reference numeral 425, the output code defines the variables from ud1 to ud8 as float (e.g., a single-precision floating-point data type, as opposed to a double-precision floating-point data type, which would be defined by a string of double). As shown by reference numeral 430, the client device 210 defines input and output arguments of the mlhdlc_sfir function as single-precision floating-point data type variables. In some implementations, the client device 210 may replace operations, expressions, or the like of the mlhdlc_sfir function to improve compatibility with single-precision data types, as described in more detail herein.

[0037] In this way, client device 210 (e.g., TCE 220) generates output code using single-precision data type variables based on input code using double-precision data types, saving time and processor resources otherwise used to generate the output code. Furthermore, by generating output code with single-precision data types, client device 210 can conserve processor resources and / or memory resources of the devices executing the output code and can increase the diversity of devices executing the output code.

[0038] Fig. Figure 4D shows an example of diagnostic messages that may be generated based on conversion operations to be performed by the client device 210. For the purposes of Fig. 4D, we assume that the client device 210 receives input code that defines a function of dut, and we assume that the client device 210 receives an instruction to generate output code with single-precision data types in the C programming language based on the dut function. The diagnostic messages may identify variables to be converted to a different data type, may identify expressions and / or operations that are likely to cause an error based on an output data type, may identify expressions and / or operations that have been substituted in the output code, may indicate whether a result of executing the output code matches a result of executing the input code, or the like. Here, the diagnostic messages relate to the generation of output code based on the dut function.

[0039] As shown by reference numeral 440, the client device 210 may provide a first diagnostic message indicating that a target compiler (e.g., a C compiler) issued warning messages when compiling the output code. As shown by reference numeral 445, the client device 210 may provide a second diagnostic message indicating that an expression in the input code (e.g., exfc) is implemented using double-precision data types and indicating that code generated for the exfc expression will include double-precision data types. Suppose that the client device 210 determines that no suitable single-precision expression can replace the exfc expression and therefore generates the second diagnostic message.

[0040] As shown by reference numeral 450, the client device 210 may provide a third diagnostic message indicating that an expression (e.g., sin) uses double precision in a particular library (e.g., the C89 / C90 library) and may suggest using a different library (e.g., the C99 library) based on the other library's sin function being compatible with the single-precision data type. In this way, the client device 210 improves the reliability of the output code and saves time and processor resources that would otherwise be used to execute and debug the inappropriate type output code. As shown by reference numeral 455, the client device 210 may provide a fourth diagnostic message indicating that an output of an expression (e.g., hist) is associated with a double-precision data type and has been assigned a single-precision data type based on the conversion information.In this way, the client device 210 provides diagnostic messages based on a conversion process that allow a user to troubleshoot problems with output code, determine which conversion operations were performed successfully, select an appropriate library to generate the output code, or the like.

[0041] As stated above Fig. 4A-4D are given as an example only. Further examples are possible and may differ from what is stated with regard to Fig. 4A-4D.

[0042] Fig. 5 is a flowchart of an example process 500 for converting variable data types into program code. In some implementations, one or more process blocks may be Fig. 5 by the client device 210. In some implementations, one or more process blocks may be Fig. 5 by another device or group of devices that are separate from or include the client device 210, such as the server device 230.

[0043] As in Fig. 5, the process 500 may include receiving input code that includes one or more variables associated with a first data type (block 510). For example, the client device 210 (e.g., TCE 220) may receive input code. In some implementations, the client device 210 may receive the input code based on user input (e.g., based on a user entering the input code, etc.), may obtain the input code from storage (e.g., from local storage, from the server device 230, based on user input specifying a location where the input code is stored, etc.), may download the input code from a web server, or the like. The client device 210 may receive the input code to generate output code based on the input code and based on conversion information relating to objects (e.g., variables, expressions, etc.).) in the input code.

[0044] The input code may include objects (e.g., variables, expressions, etc.) that can be converted to a different data type, replaced by another operation, or the like, after the generation of the corresponding output code. For example, in some cases, the input code may include one or more variables belonging to a first data type. In some implementations, each variable of the input code may belong to the same data type. In other cases, variables of the input code may belong to different data types. Additionally or alternatively, the input code may include other objects, such as expressions, operators, primitives, data classes, or the like, as described in more detail elsewhere herein.

[0045] In some implementations, client device 210 may determine data types of one or more variables in the input code. In some cases, client device 210 may determine data types of the one or more variables based on information associated with the one or more variables. For example, a user may input information associated with the variables (e.g., flags, etc.) that identifies the data types. As another example, client device 210 may determine the data types based on information included in the input code. For example, the input code may include information that defines the data types of the one or more variables (e.g., based on a variable class, an argument to a function, etc.).

[0046] In some implementations, client device 210 may determine data types of the one or more variables based on operations associated with the variables. For example, when a variable is emitted in a particular programming language by an operation that emits double-precision data type variables, client device 210 may determine that the variable is associated with the double-precision data type. In some implementations, client device 210 may determine a data type of a variable based on a default rule. For example, a particular programming language environment (e.g., TCE 220) may generate variables of a particular data type based on a default rule, and client device 210 may determine the data type of variables generated based on the default rule in the particular programming environment.

[0047] How to continue in Fig. 5, the process 500 may include receiving or determining conversion information that represents a second data type to be assigned to the one or more variables (block 520). For example, the client device 210 (e.g., TCE 220) may receive or determine conversion information associated with the one or more variables of the input code. The conversion information may identify a second data type to be assigned to the one or more variables. As a possible example, the one or more variables of the input code may be associated with a double-precision data type, and the conversion information may indicate that the one or more variables in the corresponding output code are to be associated with a different data type (e.g., a single-precision data type, an integer data type, etc.), as shown in Fig. 4A-4C. In some implementations, the client device 210 may determine conversion information related to other objects in the input code, as described in more detail below.

[0048] In some implementations, the client device 210 may receive information identifying the conversion information. For example, the client device 210 may receive input code and may receive an instruction to convert the variables of the input code from a first data type to a second data type, as in Fig. 4A. As another example, client device 210 may receive a function call with information indicating that variable values ​​returned by the function should be returned as a particular data type. Client device 210 receives a specification that includes conversion information for a plurality of different variables. The specification identifies particular variables (e.g., based on names of the particular variables, locations of the particular variables, whether the particular variables are inputs of a function and / or outputs of a function, etc.) and identifies data types to be assigned to the particular variables in output code.

[0049] In some implementations, client device 210 may receive conversion information identifying a user-defined data type. As a possible example, assume client device 210 receives the following program code: types('mlhdlc_sfir.x') = numerictype(1, 16, 14);

[0050] The above program code includes a function (e.g., "numerictype") that specifies a user-defined data type for a variable x contained in a script named "mlhdlc_sfir." The user-defined data type can be a signed data type (e.g., based on the numerictype function including a first argument of "1"), associated with 16 bits of storage (e.g., based on the numerictype function including a second argument of "16"), of which 14 bits are non-integer (e.g., based on the numerictype function including a third argument of "14"). Other conversion information examples are possible, and the implementations described here are not limited to the conversion information example above.

[0051] In some implementations, the client device 210 may determine the conversion information based on the input code and / or based on the output code to be generated from the input code. For example, if output code is to be generated in a particular programming language, the client device 210 may determine conversion information based on data types associated with the particular programming language (e.g., to improve performance in the particular programming language, to make one or more operations compatible with the particular programming language, etc.). As another example, if the client device 210 is to use a particular library to generate the output code, the client device 210 may determine conversion information to cause variables to be converted to a data type with which the particular library is compatible.

[0052] Additionally or alternatively, client device 210 may determine conversion information for a first object based on a second object. For example, if a variable input to a function belongs to a particular data type, and the function is incompatible with the particular data type, client device 210 may determine the conversion information to replace the function with another function compatible with the particular data type. In this way, client device 210 reduces errors related to data type conversion and improves the reliability of the output code.

[0053] In some implementations, client device 210 may determine conversion information based on the context in which a variable is used. For example, assume that a variable is assigned a double-precision data type in input code and is used in an indexing context (e.g., used to store integer index values). In this case, client device 210 may determine that the variable is used in the indexing context (e.g., based on operations that receive the variable as input or output to the variable, values ​​stored by the variable, etc.) and may determine conversion information based on the variable used in the indexing context (e.g., may cause the variable to be converted to a single-precision data type because a single-precision data type variable is sufficiently precise for indexing operations).In this way, the client device 210 determines conversion information for variables based on the context of the variables, thus conserving processor and memory resources that would otherwise be used to process variables associated with sub-optimal data types.

[0054] In some implementations, client device 210 may determine conversion information to conserve processor resources and / or memory resources. For example, signed variables of a particular length may utilize more processor and / or memory resources than unsigned variables of the particular length, and variables associated with fewer bits (e.g., shorter-length variables) may utilize fewer processor and / or memory resources than variables associated with more bits (e.g., longer-length variables). Conversion information for a set of variables may indicate whether each variable of the set of variables should be signed or unsigned and may identify a length of each variable. Client device 210 may configure the lengths and signs of the set of variables to conserve processor and / or memory resources.For example, client device 210 may use a shortest length that achieves a threshold accuracy with respect to an output, may not use signed variables when signed variables are unnecessary, or the like, as described in more detail below. In this way, client device 210 conserves memory and processor resources.

[0055] In some implementations, the client device 210 may determine conversion information for an object that is not a variable. For example, the client device 210 may determine that a first expression in the input code should be replaced by a second expression in the output code (e.g., based on user input, based on a standard rule, based on locally stored information identifying the first expression and the second expression, etc.). In this case, the client device 210 may determine conversion information identifying the first expression and the second expression and may generate an intermediate representation including an annotation based on the conversion information, as described in more detail below.In this way, the client device 210 can replace expressions with other expressions during compilation or runtime, allowing the client device 210 to increase performance and / or improve the accuracy of the output code, as also described in more detail below.

[0056] In some implementations, the client device 210 may determine diagnostic information based on the conversion information. For example, assume that the client device 210 (e.g., TCE 220) defaults to generating program code according to the ANSI C programming language standard, which specifies using double-precision data types. Further assume that the client device 210 receives a hint to generate output code in the C programming language with variables of a single-precision data type. In this case, the client device 210 may generate one or more diagnostic messages for a user, as described in more detail in connection with Fig. 4C. For example, the client device 210 may identify another programming language standard that can support the single-precision data type (e.g., the ISO / IEC 9899:1999 C programming language standard, etc.). Based on the identified programming language standard, the client device 210 may receive an interaction to select the identified programming language standard as the default, for example, when generating output code in the C programming language. In this way, the client device 210 may improve the reliability of the program code and conserve processor resources that may otherwise be used to generate and / or execute code with variables of inappropriate types.

[0057] How to continue in Fig. 5, process 500 may include generating an intermediate representation based on the input code that includes annotations inserted based on the conversion information (block 530). For example, client device 210 (e.g., TCE 220) may generate an intermediate representation based on the input code, as described in more detail above in connection with Fig. 4B.

[0058] The client device 210 may generate an intermediate representation in the form of a data structure stored in memory, a file, a database, or any other acceptable storage medium. The intermediate representation may be composed of input data contained in the input code and from which some or all of the target language information (e.g., output code) is composed. An intermediate representation may identify elements (e.g., variables, expressions, objects, etc.) of the input code to be converted and may describe how the elements are to be converted to generate the output code. For example, the client device 210 may receive human-readable input code and may generate an intermediate graph structure that identifies data flows in the input code. The content of an intermediate representation may, for example, consist of elements in the input code, optimization rules (e.g.,Rules for combining elements, rules for identifying redundant elements, rules for reordering elements to improve the efficiency of output code generation and / or execution, etc.), conversion information, or the like.

[0059] As an example, in relation to Fig. 4A, the expression “if isempty(ud1)” corresponds to the content of the Fig. 4B (e.g., "#if((@%isempty) v[@%ud1]) goto [merge1 _]"). The contents of the intermediate representation may identify a data path through the input code when the input code is executed. For example, when the program code is executed, execution may begin at the "start0:" portion of the intermediate representation and may proceed to the "#codeblock" portion of the intermediate representation, assuming the "isempty ud1" condition is met. If the "isempty ud1" condition is not met, execution may proceed to the "merge1 _" portion of the intermediate representation (not shown). Thus, the intermediate representation identifies the data flow during program code execution and allows for reordering and / or enhancement (e.g., optimization) of the input code when output code is generated. When an intermediate representation is generated, the client device 210 may utilize transformation rules.For example, transformation rules can determine how an element in the input code is represented in the intermediate representation or in the input code. For example, there can be a transformation rule that applies to an element of the input code for transforming the element into a section of the intermediate representation. There can also be another transformation rule for transforming the section of the intermediate representation into output code. The transformation rules can exist on a non-transitory computer-readable storage medium and can be contained in a file, database, repository, or other structure.

[0060] The intermediate representation may include annotations corresponding in output code to objects to be converted (e.g., variables, expressions, etc., associated with conversion information). An annotation may identify a conversion operation to be performed on one or more objects when generating output code based on input code corresponding to the one or more objects. For example, in some implementations, an annotation may identify a particular data type to be assigned to a variable based on a name of the particular data type (e.g., single, double, floating, integer, etc.).As another example, an annotation may include information that defines a data type for a variable based on whether the variable should be signed or unsigned, a set of bits to be used for an integer portion of the variable, a set of bits to be used for a non-integer portion of the variable, or the like.

[0061] In some implementations, an annotation may be associated with a particular expression in the intermediate representation. For example, the annotation may define another expression to replace the particular expression, may define one or more operations to be performed in conjunction with (e.g., concurrently with, before, after, based on an output of, instead of, etc.) the particular expression, or the like, may identify a rounding operation to be performed on an output of the particular expression, or the like. The intermediate representation may include information defining the particular expression and / or may include an annotation associated with the particular expression that defines the one or more operations.For example, the annotation may replace the particular expression in the intermediate representation, may be appended to the particular expression in the intermediate representation, may precede the particular expression in the intermediate representation, or the like.

[0062] The client device 210 may insert annotations into the intermediate representation based on the conversion information received in association with the input code or determined based on the input code. For example, if the intermediate representation is generated based on input code, the client device 210 may determine that a particular input object (e.g., variable, operation, etc.) in the input code is associated with conversion information (e.g., conversion information input by a user, conversion information determined by the client device 210, etc.). Based on determining that the particular input object is associated with conversion information, the client device 210 may insert an annotation into the intermediate representation corresponding to the particular input object.In some implementations, the client device 210 may receive conversion information specifying an annotation when creating an intermediate representation, and may insert the annotation into the intermediate representation based on the conversion information.

[0063] How to continue in Fig. 5, the process 500 may include generating output code including the one or more variables of the second data type based on the intermediate representation (block 540). For example, the client device 210 may generate output code including the one or more variables of the second data type based on the intermediate representation. Additionally or alternatively, the output code may include objects other than the one or more variables that have been converted based on conversion information, such as expressions, operators, or the like. In some implementations, the output code may be in the same programming language as the input code. Additionally or alternatively, the output code may be in a different programming language than the input code.As possible examples, the input code and / or output code may be in C, C++, C#, Ada, Java, Hardware Design Language (HDL), or another programming language. In some implementations, the client device 210 may generate multiple, different output code files in multiple, different programming languages ​​and / or for multiple, different output environments. In some implementations, the client device 210 may generate nested output code. For example, the nested output code may include one or more lines of code or objects corresponding to a first intermediate representation with first annotations, and one or more lines of code or objects corresponding to a second intermediate representation with second annotations.

[0064] In some implementations, when generating output code for a variable with a newly assigned data type, client device 210 may replace one or more objects related to the variable. For example, if one or more double-precision data type variables are replaced with single-precision data type variables without replacing objects associated with the input code with objects from a library associated with single-precision data type variables, non-functional code may be generated. When generating output code, client device 210 may obtain objects (e.g., functions, scripts, expressions, etc.) of the program code from a library associated with single-precision data type variables instead of a library associated with double-precision data type variables.By obtaining the objects from the library associated with single-precision data type variables, the client device 210 can generate working program code. In this way, the client device 210 conserves processor power, simplifies variable data type conversion, and improves the user experience when converting variable data types.

[0065] In some implementations, the client device 210 may use annotations to modify the execution of output code. For example, suppose that the client device 210 generates output code that includes a particular variable. Further suppose that the client device 210 receives an instruction to determine a data type of the particular variable based on a level of precision required for output with respect to the particular variable. That is, suppose that the particular variable is used as an input to an expression, and the expression outputs a value at different levels of precision based on information stored by the particular variable. If the particular variable is associated with a large bit set (e.g., 64 bits, 128 bits, etc.), the expression may output the value at a higher level of precision than if the expression is associated with a small bit set (e.g.,8 bits, 16 bits, 32 bits, etc.). The client device 210 may receive the instruction to cause the client device 210 to determine a lowest amount of bits of the particular variable that will cause the value to satisfy a boundary precision level.

[0066] When generating the intermediate representation, the client device 210 associates an annotation with the particular variable based on the instruction. The annotation identifies a location where specification information is obtained that identifies a specified data type for use with the particular variable. Output code generated based on the intermediate representation can obtain the specification information to determine the specified data type. The client device 210 executes the output code multiple times, modifying the specification information for each execution of the output code. The annotation causes the output code to modify the specification information when executed. For example, the annotation can identify various data types for use as specified data types.The client device 210 determines whether each value corresponding to each specified data type meets a threshold. In this way, the client device 210 iteratively modifies the execution of program code using annotations, which allows the client device 210 to increase (i.e., optimize) the efficiency of data types of variables of the program code.

[0067] In some implementations, an annotation may cause client device 210 to obtain information when output code is compiled based on an intermediate representation, or when an intermediate representation is generated based on conversion information. For example, the annotation may specify a location where the information is stored, and client device 210 may obtain the information when the output code is compiled or the intermediate representation is generated. The information may include, for example, data, a data type, a local variable, a global variable, a temporary variable, a function, an expression, a line of code, a subroutine, a program, or a similar object.

[0068] In some implementations, client device 210 may utilize annotations to improve the performance of program code with respect to an expression contained in the program code. For example, assume that input code includes an expression that determines a sine value of an input value. Client device 210 may receive conversion information indicating to associate an annotation with the expression. The annotation may cause client device 210 to generate output code that includes one or more operations in place of the expression (e.g., an operation to look up an approximation of the sine value in a table, an operation to approximate the sine value using fewer resources than the expression, etc.).When the client device 210 generates the output code, the client device 210 may replace the expression with the one or more operations, which conserves processor power that would otherwise be used to evaluate the expression when executing the output code.

[0069] In some implementations, when generating output code, the client device 210 may evaluate a condition based on an annotation. For example, the annotation may identify conditions based on which to selectively perform a first conversion operation or a second conversion operation, and the client device 210 may selectively perform the first conversion operation or the second conversion operation with respect to the one or more objects based on the satisfaction of the conditions. As a possible example, a condition may specify to use a first sine function when input values ​​to the function are between zero and 2*pi, and may specify to use a second, more efficient sine function when the input values ​​are between zero and pi / 2.The client device 210 can selectively utilize the first sine function or the second sine function based on determining a range of input values. In this way, the client device 210 can determine output code based on conditional conversion information, thereby improving the versatility of the output code and enabling further improvement of the output code in terms of efficiency. As further described in . Fig. 5, the process 500 may include outputting the output code and / or information related to the output code (block 550). For example, the client device 210 (e.g., TCE 220) may output the output code. In some implementations, the client device 210 may execute the output code. In some implementations, the client device 210 may generate output code in a variety of programming languages ​​(e.g., C, C++, C#, Ada, Java, HDL), and may output an executable program, code file, or the like for each of the variety of programming languages. In some implementations, the client device 210 may store the output code. In some implementations, the client device 210 may output diagnostic messages and / or diagnostic information describing the conversion information and / or the output code, as described in more detail below.

[0070] In some implementations, client device 210 may determine whether a result of executing the output code matches a result of executing the input code. For example, if the input code is associated with one or more variables of a first variable type and the output code is associated with one or more variables of a second variable type, client device 210 may execute the input code and the output code to determine whether outputs of the input code match the outputs of the output code. In a situation where the outputs match, client device 210 may provide information indicating that the outputs match (e.g., that the data type remapping was successful). In a situation where one or more outputs do not match, client device 210 may determine and / or provide diagnostic information, as described in more detail below.

[0071] In some implementations, client device 210 may provide diagnostic messages based on generating and / or executing output code. For example, client device 210 may determine that one or more outputs of the input code do not match one or more outputs of the output code and may provide a diagnostic message identifying a line of code associated with the mismatch, an expression causing the mismatch, a reason for the mismatch, or the like. As another example, client device 210 may provide diagnostic messages for one or more variables and / or objects of the output code.For example, the client device 210 may provide information identifying the corresponding variables and / or objects in the input code, may provide information identifying the conversion information for the one or more variables and / or objects, or the like.

[0072] In some implementations, client device 210 may provide diagnostic information via a user interface. For example, the user interface may display input code, output code, and / or diagnostic information. In some implementations, client device 210 may receive an interaction with a particular object (e.g., an object in input code, in output code, etc.) and may display information corresponding to the particular object, such as a corresponding object (e.g., an object in output code if the particular object is in input code, an object in input code if the particular object is in output code, etc.), conversion information associated with the particular object, a data type of the particular object, one or more variables input to and / or output by the particular object, or the like.

[0073] Although Fig. 5 example blocks of process 500, in some implementations, process 500 may include additional blocks, fewer blocks, different blocks, or differently arranged blocks than those shown in Fig. 5. Additionally or alternatively, two or more of the blocks of process 500 may be performed in parallel.

[0074] In this way, a device can convert program code variables from first data types to second data types without requiring a user to generate output code with the second data types, thus conserving processor and memory resources and reducing the likelihood of a user error. Furthermore, the device can perform diagnostic operations on the converted code to increase code efficiency and / or detect errors in the converted code, which also conserves processor and memory resources.

[0075] The present disclosure provides illustrations and descriptions, but is not intended to be exhaustive, and is not intended to limit implementations to the exact form disclosed. Modifications and variations are possible in light of the above disclosure and may be acquired from practice of the implementations.

[0076] As used herein, the term component should be broadly interpreted to include hardware, firmware, and / or a combination of hardware and software. Program code (sometimes referred to herein as code, input code, output code, etc.) should be broadly interpreted to include text-based code that requires no further processing for execution (e.g., C++ code, Hardware Description Language (HDL) code, Very High Speed ​​Integrated Circuit (VHSIC) HDL (VHDL) code, Verilog code, Java code, another type of hardware- and / or software-based code that can be compiled and / or synthesized, etc.), binary code that can be executed (e.g., executable files that can be run directly by an operating system, bitstream files that can be used to configure FPGAs, Java bytecode, object files combined with program link directories, source code, Makefiles, etc.).), text files that can be executed in conjunction with other executable programs (e.g., Python text files, Octave files, a collection of dynamic-link library (DLL) files with text-based combination / configuration information that links precompiled modules, an extensible markup language (XML) file that describes the module connection, etc.), source code (e.g., human-readable), machine code (e.g., machine-readable), or the like. In some implementations, program code may include various combinations of the code classes identified above (e.g., text-based code, binary code, text files, source code, machine code, etc.). Additionally or alternatively, program code may include code embodied using a dynamic-type programming language (e.g., M language, a MATLAB® language, a MATLAB-compatible language, a MATLAB-like language, etc.).) that can be used to express problems and / or solutions in mathematical notation. Additionally or alternatively, the program code can be any type, such as a function, a script, an object, etc.

[0077] Some implementations are described herein in connection with thresholds. As used herein, meeting a threshold may refer to a value that is greater than the threshold, more than the threshold, higher than the threshold, greater than or equal to the threshold, less than the threshold, less than the threshold, lower than the threshold, less than or equal to the threshold, equal to the threshold, etc. Certain user interfaces have been described herein and / or shown in the figures. A user interface may include a graphical user interface, a non-graphical user interface, a text-based user interface, etc. A user interface may provide information for display. In some implementations, a user may interact with the information, such as by providing input via an input component of a device that provides the user interface for display.In some implementations, a user interface may be configurable by a device and / or a user (e.g., a user may change the size of the user interface, the information provided via the user interface, a position of the information provided via the user interface, etc.). Additionally or alternatively, a user interface may be preconfigured to a default configuration, a specific configuration based on a device type on which the user interface is displayed, and / or a set of configurations based on capabilities and / or specifications associated with a device on which the user interface is displayed.

[0078] It is apparent that systems and / or methods described herein may be implemented in various types of hardware, firmware, or a combination of hardware and software. The actual specialized control hardware or software code used to implement these systems and / or methods does not limit the implementations. Therefore, the operation and behavior of the systems and / or methods have been described herein without reference to specific software code; it is understood that software and hardware may be configured to implement the systems and / or methods based on this description. Although certain combinations of features are recited in the claims and / or disclosed in the description, these combinations are not intended to limit the disclosure of possible implementations.Indeed, many of these features may be combined in ways not specifically listed here and / or disclosed in the description. Although each dependent claim listed below may directly depend on only one claim, the disclosure of possible implementations includes each dependent claim in combination with every other claim of the set of claims.

[0079] No element, act, or instruction described herein should be considered critical or essential unless identified as such. Likewise, as used herein, the articles "a," "an," and "an" are intended to include one or more entities and may be replaced with "one or more." Furthermore, as used herein, the term "set" is intended to include one or more entities (e.g., related entities, unrelated entities, a combination of related and unrelated entities, etc.) and may be replaced with "one or more." When only one entity is meant, the term "a" or similar is used. Likewise, as used herein, the terms "comprises," "have," "having," or similar are to be construed as open-ended terms.Furthermore, the term “based on” shall mean “based on, at least in part, from” unless expressly stated otherwise.

Claims

[1] Device comprising: one or more processors, wherein the processors are designed to perform the following steps: Receiving input code, where the input code is used in conjunction with the generation of output code, wherein the input code includes one or more input objects; Receiving from a specification that includes conversion information for several different variables, where the specification identifies specific variables and identifies data types that are assigned to the specific variables in the output code, wherein the conversion information describes an annotation, generating, on the basis of the conversion information and the input code, an intermediate representation containing the annotation, where the intermediate representation is used to generate the output code, where the annotation is associated with the specific variables, wherein the specified variables are used as an input to an expression, and the expression outputs a value based on information stored by the specified variable; where the annotation identifies a location where specification information is obtained that identifies specified data types for use of the particular variable, where the annotation identifies various data types for use as specified data types, Generating, based on the intermediate representation and the annotation, the output code; iteratively performing the execution of the output code using the specified data types for the particular variables and modifying the specification information for each execution of the output code; and Determine whether each value corresponding to each specified data type meets a precision threshold relative to a value of the default data type. [2] The apparatus of claim 1, wherein the one or more processors, upon receiving the conversion information: receive the conversion information separately from the input code. [3] The apparatus of claim 1, wherein the one or more processors, when determining the conversion information: determine the conversion information based on a library associated with a programming language in which the output code is to be generated. [4] The apparatus according to claim 1, wherein the conversion information is first conversion information and the modification is a first modification; and where the output code is a first output code and the intermediate representation is a first intermediate representation; and wherein the one or more processors further: receive second conversion information identifying a second modification to be performed on the output code; generate a second intermediate representation based on the input code and on the second conversion information, wherein the second intermediate representation includes a further annotation generated based on the second conversion information; and generate second output code based on the second intermediate representation, wherein the second output code includes one or more output objects generated based on the second modification. [5] The apparatus of claim 4, wherein the second intermediate representation is generated based on the modification of the first intermediate representation. [6] The apparatus of claim 4, wherein the second conversion information is received while the first intermediate representation is being generated. [7] A non-transitory computer-readable medium for storing instructions, the instructions comprising: one or more instructions that, when executed by one or more processors, cause the one or more processors to: to receive input code that contains one or more input objects, where the input code is used in conjunction with the generation of output code, wherein the output code, when generated, includes one or more output objects corresponding to and different from the one or more input objects; receive a specification including conversion information for a plurality of different variables that identifies a conversion operation to be performed to generate the one or more output objects based on the one or more input objects, the specification identifying particular variables and identifying data types to be assigned to the particular variables in the output code, where the conversion information is received separately from the input code; to generate an intermediate representation based on the conversion information and the input code, where the intermediate representation includes a note, where the annotation is associated with a specific variable, where the specified variables are used as an input to an expression, and the expression outputs a value based on information stored by the specified variable, where the annotation identifies a location where specification information is obtained that identifies specified data types for use of the particular variable, where the annotation identifies various data types for use as specified data types; compile the output code based on the intermediate representation; iteratively performing the execution of the output code using the specified data types for the particular variables and modifying the specification information for each execution of the output code; and to determine whether each value corresponding to each specified data type meets a precision threshold relative to a value with the default data type. [8] The non-transitory computer-readable medium of claim 7, wherein the one or more instructions that cause the one or more processors to determine the conversion information cause the one or more processors to: to determine that a first expression in the input code is to be replaced by a second expression in the output code; and wherein the one or more instructions that cause the one or more processors to generate the output code cause the one or more processors to: generate the output code to include the second expression instead of the first expression. [9] The non-transitory computer-readable medium of claim 7, wherein the input code is in a different programming language than the output code. [10] The non-transitory computer-readable medium of claim 7, wherein the one or more input objects include at least one of: Data, a data type, a local variable, a global variable, a temporary variable, a function, an expression, a line of code, a subroutine, or a program. [11] The non-transitory computer-readable medium of claim 7, wherein the one or more instructions that cause the one or more processors to generate the output code cause the one or more processors to: to generate multiple output code files, wherein at least one output code file of the multiple output code files is associated with a different programming language than any other output code file of the multiple output code files. [12] The non-transitory computer-readable medium of claim 7, wherein the one or more instructions that cause the one or more processors to compile the output code cause the one or more processors to: to obtain a specific object based on the one or more annotations, where the specific object is used in the output code. [13] The non-transitory computer-readable medium of claim 12, wherein the particular object is a first object; and wherein the one or more instructions that cause the one or more processors to compile the output code cause the one or more processors to: first output code and second output code, where the first output code is generated which contains the first object, and the second output code is generated that includes a second object obtained based on the one or more annotations. [14] The non-transitory computer-readable medium of claim 16, wherein the one or more processors: generate the first output code and the second output code; compare results of executing the first output code and the second output code; and Provide information based on comparing results. [15] Method comprising: Receiving input code, where the input code is used in conjunction with the generation of output code, where the input code contains one or more input objects, and where the output code, when generated, includes one or more output objects, and the receiving is performed by one or more devices; Receiving a specification that includes conversion information for a plurality of different variables that identify the one or more input objects, the specification identifying particular variables and identifying data types that are assigned to the particular variables in the output code, wherein the receiving is performed by the one or more devices; Generating, based on conversion information and the input code, an intermediate representation, where the intermediate representation includes a note, where the annotation is associated with the specific variables, where the specified variables are used as an input to an expression, and the expression outputs a value based on information stored by the specified variable, where the annotation identifies a location where Specification information is obtained that identifies specified data types for the use of the particular variable, where the annotation identifies various data types for use as specified data types; the generating is carried out by the one or more devices; Generating, based on the intermediate representation, the output code, wherein generating the output code is performed by the one or more devices; iteratively performing the execution of the output code using the specified data types for the particular variables and modifying the specification information for each execution of the output code, and Determine whether each value corresponding to each specified data type meets a precision threshold relative to a value of the default data type. [16] The method of claim 15, further comprising: Providing information for display that identifies the one or more input objects, the one or more output objects. [17] The method of claim 16, wherein providing the information for display comprises: Providing information related to the one or more output objects in association with the output code, wherein the information associated with the one or more output objects is provided for display in association with the one or more output objects in the output code.