Code processing techniques using machine learning models

By replacing code elements with shorter alternatives and adapting the model to be invariant to substitution methods, longer program code can be efficiently processed and transformed by machine learning models, enhancing translation and transformation quality and speed.

JP2026065618APending Publication Date: 2026-04-15ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2026-04-15

AI Technical Summary

Technical Problem

Machine learning models, particularly large-scale language models, struggle to process long fragments of program code due to the maximum length limitations of input requests, which can limit the processing capability and quality of code translation or transformation.

Method used

The method involves replacing elements of the original code with shorter replacement elements and processing the modified code using a machine learning model, allowing longer code fragments to be processed within a single request, and adapting the model to be invariant to the specific substitution methods used.

Benefits of technology

This approach enables machine learning models to process and transform longer program code effectively, improving the quality and speed of code translation and transformation while maintaining the integrity of the original code structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026065618000001_ABST
    Figure 2026065618000001_ABST
Patent Text Reader

Abstract

We use machine learning models to modify program code. [Solution] One aspect of the present disclosure relates to a method for processing program code using a machine learning model. The method includes the steps of accessing the original code and replacing elements of the original code with replacement elements to obtain modified code. The replacement elements are shorter than the corresponding elements in the original code. The method further includes the step of processing the modified code with a machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] In recent years, machine learning models and especially language models have been adopted in many applications for the generation and processing of program code. For example, program code can be improved, comments can be added to program code, or program code can be translated from a first programming language to a second programming language.

Summary of the Invention

Problems to be Solved by the Invention

[0002] In this context, it may be necessary to use the largest possible fragment of program code as input to a machine learning model. For example, a fragment of program code can be incorporated into a request (e.g., a prompt) to a large language model (e.g., to translate program code from a first programming language to a second programming language). To pass the desired fragment to the large language model for processing at once, the maximum length of the request may be too short.

Means for Solving the Problems

[0003] The techniques of the present disclosure are directed to solving this problem. A method according to a first aspect proposed in the present disclosure relates to a method for processing program code using a machine learning model. The method includes accessing an original code and replacing elements of the original code with replacement elements to obtain a modified code. The replacement elements are shorter than the corresponding elements of the original code. The method further includes processing the modified code by a machine learning model.

[0004] A second aspect of this disclosure relates to a method for training a machine learning model for processing program code. The method includes the steps of accessing a machine learning model and accessing two or more modified codes. Each modified code is generated from one original code by replacing elements of the original code with replacement elements, the replacement elements being shorter than the corresponding elements in the original code. The replacement elements for each modified code are at least partially different from each other. The method further includes the steps of processing two or more modified codes separately with one machine learning model and adapting the machine learning model based on an analysis of the results of processing the two or more modified codes with the machine learning model.

[0005] A third aspect of this disclosure relates to an environment designed to perform one of the methods of the first or second aspects. This environment may be a development environment for program code. A fourth aspect of the present disclosure relates to a computer program that includes instructions, which, when executed by a computing unit, causes the computing unit to execute a method for processing program code using a machine learning model according to the first aspect or a method for training a machine learning model for processing program code according to the second aspect.

[0006] The technologies of the first to fourth embodiments may have one or more of the following advantages in a considerable number of implementations: Firstly, thanks to the technology of this disclosure, it may be possible for machine learning models (e.g., large-scale language models) to process relatively long fragments of program code. In a considerable number of cases, the original code contains identifiers for variables or functions that are of considerable length. For a machine learning model to process these identifiers, it may be necessary to break them down into sequences of symbols. One example of this is tokens in a large-scale language model, i.e., words or parts of words obtained by breaking down text. That is, the variable name "rbg_VSSWiperCtrl_stLSSCar" may contain 12 tokens in a typical large-scale language model. This will result in a relatively quick elimination of the limited number of tokens that the large-scale language model can process in a single request. As a result, the length of program code that can be processed may be considerably limited. The technology of this disclosure replaces elements of the original code with shorter replacement elements (e.g., the variable name "rbg_VSSWiperCtrl_stLSSCar" with the replacement name "a"). This can reduce the number of symbols (e.g., tokens) without changing the structure of the program code. This allows the machine learning model to process this modified program code in the same way as the original code. Naturally, relatively long program code can be processed within a single request.

[0007] Secondly, and as a result, the quality and / or speed of processing program code using machine learning models (e.g., large-scale language models) can be improved in a considerable number of cases. That is, for example, the translation of program code from a first programming language to a second programming language can be improved in a considerable number of cases by processing relatively long program code within a single request. This may be because, for example, in large-scale language models, the large-scale language model uses the entire request as context for one processing, but the program parts outside the request cannot be considered as context. This can reduce processing quality because, in some circumstances, relevant information exists outside the captured context. Similar things apply to other types of processing covered in this disclosure.

[0008] The following is a definition of some of the terms used in this disclosure. "Program code" (also called "code" for short) may contain instructions that describe or represent the functionality of a particular computer program or part of it, in a particular programming language.

[0009] The program code of this disclosure may be at least part of software (software component) for any technical device designed to solve a specific technical problem. For example, the software of a computing unit (e.g., a control unit) may contain program code generated and / or processed using the technology of the present invention, or may be based on this program code after one or more processing steps, such as compilation. Further specific examples are given below.

[0010] The “System” in this disclosure can be any technical device designed to solve a specific technical problem. A system may include software components and / or hardware components (or consist of one or more of these components). A system may include a computing unit or may be designed to run on a computing unit. A system may be, for example, a computing unit with corresponding programming (e.g., a control unit) (i.e., a system may contain program code that defines at least partially the function of the system; this program code may be program code generated and / or processed using the technology of the present invention, or may be based on this program code after one or more processing steps, e.g., compilation). Further specific examples are given below.

[0011] A “machine learning model” can be any model that is or has been trained on processing program code using machine learning techniques. In a considerable number of examples, a machine learning model may be a generative machine learning model, e.g., a generative foundation model. In a considerable number of examples, a machine learning model may include a language model or a language generation model. A machine learning model may include, for example, a large-scale language model. A machine learning model may be based on an existing (trained) generative machine learning model and may be adapted for use in the manner of this disclosure by one or more of the techniques further described below (e.g., by further training and / or fine-tuning). A generative machine learning model may include, for example, one or more language models from the CodeLlama, Llama, Mistral, CoPilot, and / or the GPT family (e.g., ChatGPT). In another example, a multimodal model, e.g., Gemini, GPT4o, may be used. [Brief explanation of the drawing]

[0012] [Figure 1] This diagram illustrates the method of this disclosure. The left column shows a flowchart of the method for training a machine learning model for processing program code based on this disclosure. The middle column shows a flowchart of the method for processing program code using the machine learning model based on this disclosure. The right column shows a flowchart of the method for generating and implementing software components that contain or are based on the program code processed by the method of this disclosure. [Figure 2] This is a schematic diagram of the dictionary generation method described herein. [Figure 3] This is a schematic diagram of a method for training a machine learning model for processing program code based on this disclosure. [Modes for carrying out the invention]

[0013] Figure 1 illustrates the method of this disclosure. Section (II) shows a flowchart of the method for processing program code using a machine learning model based on this disclosure. The method for processing program code using a machine learning model involves step 101, which involves accessing the original code. The original code can be any program code or part or fragment of any program code. In a considerable number of examples, the original code may define a complete software component (e.g., the software component of a control device for the software component described below). In other examples, the original code may be a subunit of a complete software component (e.g., a method or function). In yet another example, the original code may be part of the aforementioned software component. The original code may be written in a particular programming language (i.e., a formal language for formulating data structures and algorithms, i.e., computational rules that can be executed by computational units). The original code may be written in a high-level language, but also in machine code. In other examples (or in addition), the original code may be written in a machine-readable description (e.g., code used simply for clarity and not for machine interpretation). The original code may contain machine-interpretable elements, but also metadata (e.g., comments).

[0014] In a considerable number of cases, the original code can be generated by a machine. This method further includes step 103, which involves replacing elements of the original code with replacement elements to obtain the modified code. The replacement elements are shorter than the corresponding elements in the original code.

[0015] In a considerable number of cases, the substituted element has fewer symbols than the corresponding element in the original code. In addition, or instead, at least some (i.e., some or all) of the elements in the original code may be identifiers (e.g., names) for components in the original code. These identifiers may, among other things, represent variables, functions, methods, and / or classes in the original code.

[0016] In this regard, a single symbol can be each element contained within the original code, and at least some syntactic elements of the original code are represented by identifiers consisting of multiple symbols. A symbol can be, for example, an individual sign (e.g., a letter, a number, and / or a special character), or it can consist of multiple signs (e.g., a letter, a number, and / or a special character). In addition to or instead of this, a symbol can be a syllable or a group of syllables. Further in addition to or instead of this, a symbol can be a word or a phrase or an expression consisting of multiple words or phrases.

[0017] In a significant number of cases, the type of symbol can be determined by the machine learning model that is to process the modified code. For example, a particular machine learning model may receive input in which a request to the machine learning model is broken down (parsed) into elements in a specific way. Each of these individual elements is then fed into a different input section of the machine learning model (possibly after one or more preprocessing steps). In another example, the individual elements are fed in sequentially. In a significant number of cases, the symbols can be tokens of a machine learning model (e.g., a generative language model, e.g., a large-scale language model).

[0018] The length of a substitution element (and therefore the rules for determining whether one (substitution) element is shorter than another) can vary depending on the type of symbol. The length may relate to, for example, the number of symbols (e.g., letters, numbers, and / or special characters), the number of syllables, or the number of tokens (i.e., input elements for a machine learning model).

[0019] Step 103 of replacing elements of the original code with replacement elements may, in a significant number of examples, include one or more of the following further steps or aspects. In a significant number of examples, all elements of the original code are replaced with corresponding replacement elements. In another example, only some of the elements of the original code may be replaced with corresponding replacement elements. For example, only elements having a certain minimum length may be replaced (e.g., determined by the number of symbols, e.g., three or more symbols). In addition or alternatively, elements may be replaced with corresponding replacement elements only in a specific part of the original code. Further in addition or alternatively, only elements up to a length until the original code reaches a certain minimum length may be replaced with corresponding replacement elements.

[0020] In a significant number of examples, certain elements of the original code may not be replaced (e.g., commands in the programming language in which the original code is written). For a specific illustration, a short example is introduced below. In this example, the original code is written in the programming language C. One line of the code has the following content.

[0021] rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_stT15Car=((rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_flgCANTestReq)??rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_stCarT15CarTest_C:(((Rte_DRead_RP_Com_Car_To_VCU_flgT15On_rba_Nds_Swc_VDP_Car_To_VCU_flgT15On())?1U:0U))); As can be recognized, this code includes very long identifiers. Thus, these elements may be replaced with corresponding replacement elements.

[0022] b.bt=((b.ee)?b.en:(((em())?1U:0U))); For example, the identifier "rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_stT15Car" for a field of one variable was replaced with the identifier "b.bt". This identifier "b.bt" consists of, for example, significantly fewer characters or tokens.

[0023] This method further includes step 105 of processing the modified code by a machine learning model. This processing can include any technique for changing, improving, or transforming the (modified) code. Processing 105 generates the processed modified code (the processed modified code can still include one or more replacement elements).

[0024] In a significant number of examples, the processing of the modified code by a machine learning model can include the step of incorporating at least a part of the modified code into a request to the machine learning model. For example, the modified code can be incorporated into a request (e.g., a prompt) of a generative language model.

[0025] In a significant number of examples, this processing includes the step of translating the modified code from a first programming language to a second programming language. In this example, the machine learning model can be a machine learning model trained for translating code from the first programming language to the second programming language (e.g., a generative language model, e.g., a large language model).

[0026] In addition to or instead of, the process may include steps to modify the modified code based on a predetermined target criterion. In this example, the machine learning model could be a machine learning model trained on code improvements related to the target criterion (e.g., a generative language model, e.g., a large-scale language model). The target criterion could be, for example, the removal of defects from the modified code. In this case, the process may include steps to remove defects from the modified code. In addition to or instead of, the target criterion could include optimization of the modified code (e.g., improving the performance of the modified code related to tasks such as reducing the resource requirements of the modified code, conforming the modified code to a formatting scheme, and / or other optimizations). In this case, the process may include steps to optimize the modified code.

[0027] In addition to or instead of the above, processing of the modified code may include a step of transforming the modified code from being adapted for a first execution environment (e.g., a first hardware platform) to being adapted for a second execution environment (e.g., a second hardware platform). In this example, the machine learning model may be a machine learning model trained on the transformation of code from being adapted for a first execution environment (e.g., a first hardware platform) to being adapted for a second execution environment (e.g., a second hardware platform) (e.g., a generative language model, e.g., a large-scale language model). For example, the modified code may be adapted for a first type of computing unit (e.g., a microcontroller, processor, backend system, cloud system, edge system) and, through processing, may be adapted to run on a second type of computing unit (e.g., a microcontroller, processor, backend system, cloud system, edge system) that is different from the first type of computing unit.

[0028] In addition to or instead of this, processing the modified code may include the step of adding comments or explanations to the modified code. In this example, the machine learning model could be a machine learning model trained on the comments or explanations of the code (e.g., a generative language model, e.g., a large-scale language model).

[0029] The machine learning model used for processing can be any suitable machine learning model (e.g., a machine learning model encompassing one or more neural networks). In a considerable number of examples, the machine learning model is a generative machine learning model, e.g., a generative foundation model. In a considerable number of examples, the machine learning model may include a language model, e.g., a language generation model. For example, the machine learning model may include a large-scale language model. The machine learning model may be based on an existing (trained) generative machine learning model and may be adapted for use in the manner of this disclosure by one or more of the techniques further described below (e.g., by further training and / or fine-tuning). The generative machine learning model may include, for example, one or more language models from the CodeLlama, Llama, Mistral, CoPilot, and / or the GPT family (e.g., ChatGPT). In another example, a multimodal model, e.g., Gemini, GPT4o, may be used.

[0030] In the small example shown above, the lines of code presented can be translated from the programming language C to the programming language Rust by a machine learning model. b.bt=if b.ee{b.en}else{if em(){1}else{0}}; In a significant number of cases, this method further includes step 107, in which the substitution elements in the modified code are reverse-substituted with elements from the original code. In other words, the modifications introduced in substitution step 103 within the processed modified code are reversed. This reverse substitution step 107 may generate processed code (i.e., unmodified code or processed original code). This processed code may contain the identifiers, symbols, or other elements of the original code. In other words, even though the modified code, and not the original code itself, has been processed (and the original code may, in some circumstances, be impossible for the machine learning model to process at all), this processed code may appear as if the original code had been processed by the machine learning model. This can extend the usability of the machine learning model.

[0031] In the example already mentioned, the modified code processed in the Rust programming language is transformed back into the processed code by inverse substitution of the substituted elements. rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_stT15Car=if rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_flgCANTestReq{rbg_VcuWiperCtrl.rbg_VSSWiperCtrl_stCarT15CarTest_C}else{if Rte_DRead_RP_Com_Car_To_VCU_flgT15On_rba_Nds_Swc_VDP_Car_To_VCU_flgT15On(){1}else{0}}; In a considerable number of cases, the steps of replacing elements in the original code with replacement elements and / or reverse-replace the replacement elements with elements in the original code may involve the use of a dictionary that defines how the replacement elements correspond to the elements in the original code. The dictionary may involve a one-to-one assignment of a large number of elements to a large number of replacement elements (for example, in any suitable data structure, e.g., a database). The replacement in this case may involve the step of reading one replacement element from the dictionary for one particular element in the original code. The reverse replacement may involve the step of reading one element from the dictionary for one particular replacement element in the processed modified code.

[0032] In another example, the steps of replacing elements of the original code with replacement elements and / or inversely replacing the replacement elements with elements of the original code may involve the use of a rule-based algorithm. This step may involve, for example, the use of a replacement function or an inverse replacement function. A replacement function or an inverse replacement function can be a bijective function that assigns elements one-to-one with replacement elements (and simultaneously causes a reduction in the length of the replacement element compared to the element). An inverse replacement function may be the opposite of a replacement function (i.e., applying an inverse replacement function after applying a replacement function is an identity operation). A replacement function may involve, for example, losslessly compressing elements to generate replacement elements. In addition to or instead of this, a replacement function may include an encoding function (e.g., entropy encoding). A replacement function or an inverse replacement function can exist in any conceivable format (e.g., as a computer program or as a function of a computer program).

[0033] In a considerable number of examples, the method of this disclosure includes a step of generating a dictionary (for the aforementioned substitution or reverse substitution step). In a considerable number of examples, this generation may occur in parallel with the step of substituting elements. In other examples, the dictionary generation may occur before the step of substituting elements in the original code (i.e., the dictionary is created based on original code that exists at the start of the substitution step and / or is not the original code that exists specifically for processing). In yet another example, an existing dictionary may be expanded and / or supplemented during the element substitution step (e.g., by new pairs of elements and substitution elements).

[0034] In another example, the method of the present disclosure includes the step of generating a rule-based algorithm (e.g., a bijective function) that transforms one element into one replacement element and the opposite of that (for the aforementioned replacement or inverse replacement step). The replacement function may include, for example, losslessly compressing the elements to generate the replacement element. In addition to or instead of that, the replacement function may include an encoding function (e.g., entropy encoding).

[0035] Figure 2 schematically illustrates method 200 for generating the dictionary of this disclosure. In a considerable number of cases, the generation of dictionary 203a can be performed by a rule-based algorithm 201 (for example, from one or more first original codes 206a by one of the rule-based algorithms described above). For example, one or more heuristic rules can be used to form corresponding replacement elements from elements (or one or more of the symbols described above that constitute the elements).

[0036] In another example, the dictionary may be implemented using a further machine learning model 204 (from one or more second original code 206b) to generate dictionary 203b. This further machine learning model 204 may be trained to generate one corresponding unambiguous substitution element for each element. In a considerable number of examples, the substitution elements may contain human-readable identifiers (e.g., identifiers for objects, classes, variables, functions, or methods). In this case, the further machine learning model 204 may be trained to generate substitution elements by or from human-readable identifiers. To this end, the further machine learning model 204 may analyze the context of each element.

[0037] In either case, the dictionary generation method may include a uniqueness check 205. This uniqueness check 205 may include comparing all elements in the dictionary with each other to determine if any element is assigned twice. In this case, one (or both) of the elements assigned twice may be changed.

[0038] This disclosure also relates to a method for training a machine learning model for processing program code. The left column (I) of Figure 1 shows a flowchart of the method for training a machine learning model for processing program code based on this disclosure. Figure 3 shows a schematic representation of the method for training a machine learning model for processing program code based on this disclosure.

[0039] A method for training a machine learning model for processing program code includes step 115, which accesses the machine learning model 304. The machine learning model 304 can be trained for one of the processing tasks described above.

[0040] The method for training a machine learning model involves step 117 accessing two or more modified codes 307a, 307b, 307c (e.g., more than two or more than five modified codes). Each modified code 307a, 307b, 307c is generated from a single original code 306 by replacing elements of the original code 306 with replacement elements. The replacement elements are shorter than the corresponding elements in the original code. The replacement elements for each modified code are at least partially different from each other. In other words, the replacement elements for each of the two or more modified codes are differently selected (i.e., the same original code 306 is modified in two or more different ways).

[0041] In a considerable number of examples, this method involves the step of replacing elements of the original code 306 with different replacement elements (e.g., using the techniques described above for element substitution) in order to obtain two or more modified codes 307a, 307b, 307c. The two or more modified codes 307a, 307b, 307c can differ from one another in various ways; for example, different dictionaries 303a, 303b, 303c and / or different rule-based algorithms may be used to select the replacement elements.

[0042] The method for training a machine learning model for processing program code further includes step 119 of processing two or more modified codes 307a, 307b, and 307c separately by the machine learning model 304. In other words, each modified code 307a, 307b, and 307c can be processed by the machine learning model 304 independently of further modified codes 307a, 307b, and 307c (to generate two or more attributed processed modified codes 308a, 308b, and 308c).

[0043] The method for training a machine learning model for processing program code further includes step 121 of adapting a machine learning model 304 based on an analysis of the results of processing two or more modified codes 307a, 307b, and 307c. The goal of adaptation 121 may be, for example, independence from the substitution elements of the modified code. In other words, the machine learning model 304 should be modified so that the processing results of the machine learning model 304 do not depend on the way in which specific substitution elements are selected (e.g., a specific dictionary and / or a specific rule-based algorithm). This makes the machine learning model 304 invariant to changes in the dictionary and / or specific rule-based algorithm used in the substitution step.

[0044] In a significant number of examples, the analysis includes the steps of comparing the results of separate processing of two or more modified codes 307a, 307b, 307c, and fitting a machine learning model 304 based on the results of the comparison. For example, within two or more processed modified codes 308a, 308b, 308c, each, a substitution element may be reverse-substituted with a corresponding element (e.g., using specific dictionaries 303a, 303b, 303c and / or specific rule-based algorithms). This may generate two or more processed codes 309a, 309b, 309c. Thus, the comparison may include the step of checking whether two or more processed codes 309a, 309b, 309c are the same or at least similar (under a given similarity measure). Depending on the results of this comparison, the machine learning model 304 (e.g., its parameters) may then be fitted to achieve or enhance the match or similarity of the processed codes generated by the machine learning model 304.

[0045] This match or similarity can be determined by checking the functional equivalence of the processed codes 309a, 309b, and 309c (i.e., whether the processed codes 309a, 309b, and 309c exhibit the same or similar functionality). Functional equivalence can be determined, for example, by testing the processed codes 309a, 309b, and 309c, by model checking methods using the processed codes 309a, 309b, and 309c, or by fuzzing the processed codes 309a, 309b, and 309c.

[0046] In a significant number of cases, this fitting is performed by unsupervised training of machine learning model 304 (for example, based on the comparisons described above, which can be used to construct a loss function related to the training of machine learning model 304).

[0047] The right column (III) of Figure 1 shows a flowchart illustrating a method for generating and implementing software components that contain or are based on program code processed by the method of this disclosure.

[0048] The methods described herein can generally be implemented within the framework of a software development process (for example, software for a particular technical system, such as a control unit). This disclosure relates to the implementation of one method for processing program code using the machine learning model of this disclosure, and also to the generation of software components that contain or are based on the processed program code. This generation may involve one or more steps to make the processed program code into an executable software component (e.g., compilation). In other cases, this generation may produce software components that must be further converted into executable software components.

[0049] This method may further involve the implementation of software components (e.g., executable software components) within the system. Depending on the type of system, this implementation may include creating an instance of the system, installing software components to generate an instance of the system, or similar implementation steps. For example, software components may be installed in a computing unit. Specific software components and systems are described further below.

[0050] This disclosure also relates to an environment designed to perform one of the methods of this disclosure. In a considerable number of cases, this environment may be a development environment for program code. This disclosure also relates to methods of using software components that include or are based on program code processed by the technology of this disclosure, or to systems that include such software components.

[0051] For example, a software component or a system containing a software component (e.g., a control device) may be designed for regulating and / or controlling and / or monitoring a technical system.

[0052] For example, this method may involve the use of software components or systems containing software components for controlling, regulating, and / or monitoring vehicle functions, robotic functions, building automation functions, power tool automation functions, and / or home appliance automation functions.

[0053] In one example, a software component or a system containing a software component may be designed to be placed inside a vehicle and / or to control vehicle functions (in particular to control driving functions). Vehicle functions may be, for example, functions for autonomous and / or assisted driving. In a considerable number of examples, a software component or a system containing a software component may be designed to run on a computer system in a vehicle (e.g., a vehicle that drives autonomously, highly automated, or assisted). This computer system may be implemented, for example, locally within the vehicle or (at least partially) within a backend that is communicatively connected to the vehicle. A system containing a software component may include, for example, control equipment or may be control equipment. In a considerable number of examples, a vehicle may include a computer system with a communication interface that enables communication with a backend. For example, a software component may run within this backend. In one example, a particular system may be a system for lateral and / or longitudinal steering of the vehicle. In an example, a software component or a system containing a software component may receive speed information or distance information as input data. Alternatively, or in addition, the input data may include relative speed and / or distance between a first vehicle, a second vehicle, a person, and / or a stationary object. Alternatively, or in addition, the input data may include a variable based on at least one of the following: steering angle, direction angle, yaw rate, sideslip angle, and / or lateral error. Alternatively, or in addition, the input data may include information from a network, such as movement and / or direction information of other vehicles. In the example, this information may be provided by vehicle-to-vehicle (V2V) communication or by a backend (V2X) communication. Alternatively, or in addition, the input data may include target values ​​for steering speed or acceleration and / or braking processes.

[0054] In the example, a software component or a system containing a software component may be designed to be located within a drive control unit or drive unit and / or used for adjusting motor-related functions (particularly for motor adjustment). In the example, a software component or a system containing a software component may be designed to be located within the drive adjustment unit of an electromechanical device. For example, the state vectors of a state-space model may contain variables based on at least one of the electromechanical control signals, operating modes, or output adjustments.

[0055] This disclosure also relates to the use of software components or systems containing software components for controlling and / or regulating and / or monitoring robots.

[0056] In another example, a software component or a system containing a software component may be located within a robot and / or designed to control robot functions (particularly the robot's mobility). A software component or a system containing a software component could, for example, be a system for the robot's lateral and / or longitudinal steering. In a considerable number of examples, a software component or a system containing a software component may run on the robot's computer system. This computer system may, for example, be implemented locally within the robot or (at least partially) within a backend that is communicatively connected to the robot. In a considerable number of examples, a software component or a system containing a software component may run within a backend. In an example, a software component or a system containing a software component may take velocity information or distance information as input data. Alternatively or in addition, the input data may include relative velocity and / or distance between a first robot, a human, further mobile devices, and / or stationary objects. Alternatively or in addition, the input data may include variables based on at least one of the following: rudder angle, direction angle, yaw rate, sideslip angle, and / or lateral error. Alternatively, or in addition to the above, the input data may include information from a network, such as movement and / or direction information of other robots, mobile devices, and / or humans. In the example, this information may be provided by direct communication or by a backend. In one example, the input vector may include target values ​​for steering speed or acceleration and / or braking processes.

[0057] This disclosure also relates to the use of software components or systems containing software components for controlling and / or regulating and / or monitoring functions in building automation.

[0058] For example, a software component or a system containing a software component may be designed for placement within a building and / or used for controlling and / or regulating and / or monitoring building functions (particularly for controlling and / or regulating building automation functions). Building functions may include, for example, functions for regulating room temperature, lighting, and / or safety mechanisms.

[0059] The technology described herein can be performed automatically in a considerable number of cases. Furthermore, a computer system designed to perform a method for processing program code using a machine learning model based on this disclosure is disclosed. Alternatively, or in addition to that, a computer system may be designed to perform a method for training a machine learning model for processing program code based on this disclosure. The computer system may include a processor and / or main memory. The computer system may be network-based and / or distributed. For example, the step of processing the modified code may be performed on a remote server (which may also be a distributed system).

[0060] Furthermore, a computer program containing instructions is disclosed, which, when executed by a computer system, causes the computer system to execute a method for processing program code using a machine learning model based on this disclosure. Alternatively, or in addition to, a computer program may contain instructions, when executed by a computer system, causing the computer system to execute a method for training a machine learning model for processing program code based on this disclosure. The computer program may exist, for example, in an interpretable form or in a compiled form. The computer program may be downloaded (at least partially) into the computer's RAM for execution, for example, as a bit sequence or a byte sequence. [Explanation of symbols]

[0061] 201 Rule-Based Algorithms 203a, 203b, 303a, 303b, 303c dictionary 204 Further Machine Learning Models 206a, 206b, 306 Original Code 304 Machine Learning Models Modified codes 307a, 307b, and 307c 308a, 308b, 308c Processed modified code 309a, 309b, 309c Processed Code

Claims

1. A method for processing program code using machine learning models, Step (101) to access the original code (206a; 206b; 306), Step (103) is to replace the elements of the original code (206a; 206b; 306) with replacement elements in order to obtain the modified code (307a; 307b; 307c), Step (103), where the substitution element is shorter than the corresponding element in the original code. A method comprising the step (105) of processing the modified code by a machine learning model (304).

2. The method according to claim 1, further comprising the step (107) of inversely substituting the substitution elements in the modified code (307a; 307b; 307c) with the elements of the original code (206a; 206b; 306).

3. The method according to claim 1 or 2, wherein the machine learning model (304) is a language model, in particular a large-scale language model.

4. The method according to any one of claims 1 to 3, wherein the substitution element has fewer symbols than the corresponding element of the original code (206a; 206b; 306), and in particular the symbols are tokens of the machine learning model (304).

5. The method according to any one of claims 1 to 4, wherein at least a portion of the elements of the original code (206a; 206b; 306) are identifiers for components of the original code (206a; 206b; 306), in particular identifiers for objects, variables, functions, methods, and / or classes.

6. The processing of the aforementioned modified code (307a; 307b; 307c) The step of translating the modified code (307a; 307b; 307c) from a first programming language to a second programming language, A step of changing the modification code (307a; 307b; 307c) based on a predetermined target criterion, The steps of converting the modified code (307a; 307b; 307c) from conforming to a first execution environment to conforming to a second execution environment, and / or Steps to add comments or explanations to the aforementioned modified code (307a; 307b; 307c) The method according to any one of claims 1 to 5, comprising one or more of the above.

7. The method according to any one of claims 1 to 6, wherein the processing of the modified code (307a; 307b; 307c) by the machine learning model (304) includes the step of incorporating at least a portion of the modified code (307a; 307b; 307c) into a request to the machine learning model (304).

8. The method according to any one of claims 1 to 7, wherein the steps of replacing the elements of the original code (206a; 206b; 306) with replacement elements and / or inversely replacing the replacement elements with the elements of the original code (206a; 206b; 306) include the use of a dictionary (203a, 203b; 303a; 303b; 303c) that defines how the replacement elements correspond to the elements of the original code (206a; 206b; 306).

9. The method of claim 8, further comprising the step of generating the dictionary (203a, 203b; 303a; 303b; 303c), wherein the dictionary is generated using a further machine learning model (204) for generating the dictionary.

10. A method for training a machine learning model for processing program code, Step (115) to access the machine learning model (304), Step (117) is to access two or more modified codes (307a; 307b; 307c), Each modified code (307a; 307b; 307c) is generated from the same original code (306) by replacing the elements of the original code (306) with replacement elements. The substitution element is shorter than the corresponding element in the original code (306), and Step (117), the substitution elements for each of the modified codes (307a; 307b; 307c) are at least partially different from each other. The steps include (119) processing two or more of the modified codes (307a; 307b; 307c) separately using one machine learning model (304), and A method comprising step (121) of adapting the machine learning model (304) based on an analysis of the results of processing two or more of the modified codes (307a; 307b; 307c) by the machine learning model (304).

11. The aforementioned analysis, The step includes comparing the results of the separate processing (119) of two or more of the modified codes (307a; 307b; 307c), and the conformance (121) is The method according to claim 10, further comprising the step of adapting the machine learning model (304) based on the results of the comparison.

12. The method according to claim 11, wherein the objective of the conformance (121) is that the processing is independent of the substitution elements of the modified code.

13. An environment designed to perform one of the methods of claims 1 to 12, wherein the environment is optionally a development environment for program code.

14. A computer program that includes instructions, wherein when the instructions are executed by a computing unit, the computing unit causes the computing unit to execute a method for processing program code using a machine learning model according to any one of claims 1 to 9 or a method for training a machine learning model for processing program code according to any one of claims 10 to 12.