Compiler extension for correcting error messages
First Claim
1. A method comprising:
- receiving, by a processing device, a first set of instructions coded in a first language;
compiling, by the processing device, the first set of instructions to obtain a second set of instructions coded in a second language, wherein the second language is different than the first language;
executing a compiler extension;
in response to compiling the first set of instructions, generating, by the compiler extension, a first table of key-value pairs for a first set of error messages that are within the first set of instructions, wherein keys of the key-value pairs in the first table correspond to error messages used with the first set of instructions;
retrieving, from a memory device, a second table of key-value pairs for default error messages used with the second set of instructions, wherein the second table of key-value pairs is stored at the memory device;
determining, by the compiler extension, a mistake for a key of the keys of the key-value pairs in the first table by identifying that the key of the key-value pairs in the first table is not in the second table;
generating a fault message indicating the mistake with the key in the first table; and
replacing a first key in the first table and in the first set of instructions with a second key in the second table in response to determining that the first key is a variant of the second key in the second table.
1 Assignment
0 Petitions
Accused Products
Abstract
A mechanism for correcting mistakes in error messages in a set of instructions is disclosed. A processing device may receive a set of instructions for a program. The processing device may generate a first table of key-value pairs for a first set of error messages that are within the set of instructions, where keys of the key-value pairs in the first table correspond to error messages and values of the key-value pairs represent symbols to insert into the error messages. A second table of key-value pairs for default error messages may be received. A determination may be made of a mistake for a key of the keys of the key-value pairs in the first table by identifying that the key of the key-value pairs in the first table is not in the second table. A fault message may be generated to indicate the mistake with the key.
-
Citations
20 Claims
-
1. A method comprising:
-
receiving, by a processing device, a first set of instructions coded in a first language; compiling, by the processing device, the first set of instructions to obtain a second set of instructions coded in a second language, wherein the second language is different than the first language; executing a compiler extension; in response to compiling the first set of instructions, generating, by the compiler extension, a first table of key-value pairs for a first set of error messages that are within the first set of instructions, wherein keys of the key-value pairs in the first table correspond to error messages used with the first set of instructions; retrieving, from a memory device, a second table of key-value pairs for default error messages used with the second set of instructions, wherein the second table of key-value pairs is stored at the memory device; determining, by the compiler extension, a mistake for a key of the keys of the key-value pairs in the first table by identifying that the key of the key-value pairs in the first table is not in the second table; generating a fault message indicating the mistake with the key in the first table; and replacing a first key in the first table and in the first set of instructions with a second key in the second table in response to determining that the first key is a variant of the second key in the second table. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An apparatus comprising:
-
a memory device; and a processing device, operatively coupled with the memory device, to; receive a first set of instructions that is coded in a first language; compile the first set of instructions to obtain a second set of instructions coded in a second language, wherein the second language is different than the first language; execute a compiler extension in response to compiling the first set of instructions, generate by the compiler extension, a first table of key-value pairs for a first set of error messages that are within the first set of instructions, wherein keys of the key-value pairs correspond to error messages used with the first set of instructions and values of the key-value pairs represent values to insert into the error messages; retrieve, from the memory device, a second table of key-value pairs for default error messages that are used with the second set of instructions, wherein the second key value table is stored at the memory device; identify a first key of the key-value pairs in first table that is not in the second table; determine that the first key in the first table is a variant of a second key in the second table; and replace a first key in the first table and in the first set of instructions with a second key in the second table in response to determining that the first key is a variant of the second key in the second table. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer-readable storage medium, having instructions stored therein, which when executed, cause a processing device to:
-
receive a first set of instructions coded in a first language; compile the first set of instructions to obtain a second set of instructions coded in a second language, wherein the second language is different than the first language; execute a compiler extension; in response to compiling the first set of instructions, generate, by the compiler extension, a first table of key-value pairs for a first set of error messages in the first set of instructions, wherein keys of the key-value pairs correspond to error messages in the first table and values of the key-value pairs represent values to insert into the error messages; retrieve, from a memory device, a second table of key-value pairs for default error messages used with the second set of instructions wherein the second key value table is stored at the memory device; determining, by the compiler extension, a mistake for a key of the keys of the key-value pairs in the first table by identifying that the key of the key-value pairs in the first table is not in the second table; generating a fault message indicating the mistake with the key in the first table; and replacing a first key in the first table and in the first set of instructions with a second key in the second table in response to determining that the first key is a variant of the second key in the second table. - View Dependent Claims (18, 19, 20)
-
Specification