WO2015041575A1 - Method for generating syntactically and semantically correct commands - Google Patents

Method for generating syntactically and semantically correct commands Download PDF

Info

Publication number
WO2015041575A1
WO2015041575A1 PCT/RU2014/000703 RU2014000703W WO2015041575A1 WO 2015041575 A1 WO2015041575 A1 WO 2015041575A1 RU 2014000703 W RU2014000703 W RU 2014000703W WO 2015041575 A1 WO2015041575 A1 WO 2015041575A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
syntactically
relational
elements
semantically correct
Prior art date
Application number
PCT/RU2014/000703
Other languages
French (fr)
Russian (ru)
Inventor
Сергей Михайлович НАЗАРОВ
Original Assignee
Сергей Михайлович НАЗАРОВ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from RU2013142876/08A external-priority patent/RU2534823C1/en
Priority claimed from RU2013149976/08A external-priority patent/RU2546058C1/en
Application filed by Сергей Михайлович НАЗАРОВ filed Critical Сергей Михайлович НАЗАРОВ
Publication of WO2015041575A1 publication Critical patent/WO2015041575A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Definitions

  • the invention relates to solutions in the field of database management systems (DBMS), in particular to a method for generating syntactically and semantically correct instructions.
  • DBMS database management systems
  • BNF Backus-Naur
  • SQL Structured Query Language
  • DB databases
  • the Oracle DBMS commands for managing a database instance are described in Diana Lorentz et al. "Oracle Database SQL Language Reference)), llg Release 1 (11.1), August 2010 (URL: http://docs.oracle.com/cd/B28359_01/server.11 l / b28286.pdf).
  • All Oracle DBMS commands are elements of the SQL language developed by Oracle.
  • syntax diagrams (SD) and a simplified version of the BNF are used.
  • Command systems in other Oracle products, for example, PL / SQL, Backup and Recovery, Expdp, Impdp, can also be described using BNF.
  • DBMS In addition to Oracle DBMS, there are other examples of DBMS, for the description of the command system which versions of the BNF are used.
  • the aim of the present invention is the provision of a method, device and system for the automatic generation of syntactically and semantically correct instructions, providing the generation of syntactically and semantically correct instructions with a high degree of accuracy and automation.
  • the technical result is to provide automation and improve the accuracy of generating DBMS commands and reduce the amount of computation required to generate DBMS commands.
  • Embodiments of the present invention relate to methods, devices, and systems for generating syntactically and semantically correct instructions for executing successive stages in which in a preferred embodiment of the present invention is carried out:
  • DBMS database management system
  • FIG. 1 illustrates the main steps of a method for generating syntactically and semantically correct instructions.
  • FIG. 2 illustrates an exemplary embodiment of a computing device suitable for implementing a method for generating syntactically and semantically correct instructions.
  • FIG. 3 illustrates an exemplary embodiment of a system suitable for implementing a method for generating syntactically and semantically correct instructions.
  • the BNF metalanguage is the standard language for describing the syntax of programming languages.
  • Delimiters are delimiters that differ from brackets, braces, vertical bars and ellipses, which must be entered as shown.
  • SE structural elements
  • " are auxiliary. They are not elements of the programming language that is described using the BNF metalanguage.
  • the meta-description of the programming language includes terminal elements (TE) and non-terminal elements (NTE).
  • TEs, or keywords are described in bold and uppercase. NTEs are described in lower case and are replaced by a name or value during the generation of commands. The need for such a record is due to the functioning of the DBMS, which recognizes commands based on the form of their record - the syntax. Commands written in violation of the requirements set forth in the documentation for the DBMS will not be recognized and processed by the DBMS.
  • a cell is a subset of BNF of one level of nesting, limited by FE or vertical bar.
  • the symbol "." inside the cell denotes any valid BNF.
  • the first HC corresponds to EL and SE and represents the level of the SQL command, the generation of which is carried out in accordance with the present invention.
  • the content of SE in turn refers to
  • corresponds to UV2.
  • the EL of the next embedded SE namely the EL “SSSS”, “xxxx” and “
  • EL " ⁇ " corresponds to the fourth HC (UEZD).
  • UV1 corresponds to degenerate cellular, since there is no SC at this level.
  • HC2 The following cells are located on HC2:
  • RBNFs are used as elements of an automated system to generate the entire set of syntactically correct DBMS control commands and are contained in the basic semantic rule assigned to a command to be converted to a syntactically and semantically correct command.
  • the syntactically correct command will not execute the DBMS correctly.
  • Semantic rules include refinements and exceptions that are used in processing the corresponding commands. These semantic rules should also be formalized (translated into a relational form), their application should be automated to ensure the generation of syntactically and semantically correct instructions.
  • opening elements OE: " ⁇ " or "[”, or "
  • the process of converting text BNF to RBNF includes the steps of:
  • ELs are CREATE, GLOBAL, TEMPORARY, TABLE, schema., Table, relational_table, object_table, XMLType_table limited by the corresponding SE - "[" and “]” for "GLOBAL” and “TEMPORARY", other "[” and “]” for “schema.”, " ⁇ ” And “ ⁇ ” for nested alternative EL “relational_table”, “object_table” , "XMLType_table” and delimiters "
  • Column U contains a unique record identifier (EL)
  • column FILE_NAME contains the name of the converted BNF
  • column LINE contains the element BNF (record BNF)
  • column NXT contains a link to the closing structure bracket for the opening structure bracket, and a link to the opening structure bracket parenthesis
  • the PREV column contains a link to the external SE or 0 for the most external SE
  • the NREF column contains a link to the previous cell restriction. If the FE is repeating, the corresponding cell in the DEEP column is assigned the value 1.
  • each RBNF has a unique key, each element of which can be associated with a corresponding element of unique keys of relational semantic rules (RSF), which will be described in detail below.
  • RSF relational semantic rules
  • the RBNF contains the following attributes: RBNF name - the name of a particular team or a fragment of the DBMS documentation (the name of the text BNF);
  • rBNF unique key any unique key that can be formed from one or more entries contained in the rbnf.
  • such a key can be a key formed from the line number (GO), the name rBNF (text BNF) and the record in one of the cells rBNF.
  • a unique key may be a combination of records from columns P) and FILE NAME and LINE located on the same row.
  • a pass may be applicable, while such SCs may be removed from the RBNF; for a SC that is repeating (a SC recorded before the sign of repeatability “...”), duplication can be applied, creating a copy of such a SC and recording it after the initial SC; for EL, a choice can be applied, while the cell in which the EL is written is determined to be selected, and the SE in which the cell is located is replaced by the selected cell, and the selected cell goes to a higher HC;
  • a value assignment procedure may be applied
  • HC2 generally consists of several cells, the selection of the required cells can be made;
  • step ccc if on UV2 there is a cell containing EL that can be selected, a return is made to step ccc); if not, then a transition is made to step ggg);
  • step aaa if there is an NTE on UV1, which is the name of the BNF, then go to step aaa), if not, then the SQL command generation cycle ends.
  • Semantic rules are fragments of the text of the DBMS documentation, which impose additional restrictions on the execution (execution) of commands in the DBMS.
  • the main feature of the RBNF is that it contains records of all SE, TE, STE, separators and repeatability characteristics, which are presented in the DBMS documentation. This allows you to use them when creating a CSP.
  • the text fragment of the Oracle DBMS documentation is marked with quotation marks, which defines additional conditions that must be met for the create table / colimm definition command to work correctly, which is the Oracle DBMS control command.
  • Such semantic rules in themselves cannot be recognized by the DBMS and must be formalized and presented in the form of a CSP.
  • the main SP assigned to the team to be converted to a syntactically and semantically correct command can be formalized and represented as a set of pSP.
  • the first column contains the number of the RPN element
  • the second column is the number of the RBNF element
  • the fourth column is the name of the RPN, the same as the RBNF to which the RPN is applied
  • the fifth column is the corresponding TE or NTE to which the rule applies
  • sixth column possible operations on an element, due to which an element can be selected to which an element of CPD is applied, while the element can be checked for the value assigned to the element displayed in the seventh column
  • the eighth column is a logical nktsiya ninth column - comment tenth column - fragment documentation (in this particular example is not used)
  • the eleventh column is an indication of the command to which the rule applies
  • the twelfth column is the rule status
  • the thirteenth column is a sign of rule activity.
  • each CPN has a unique key with which the corresponding RBNF can be associated.
  • a unique rSP key is any unique key that can be generated from one or more records contained in a rSP associated with the corresponding rBNF.
  • a key can be a key generated from the line number (GO) in rBNF, the name rBNF (text BNF), and the record in one of the rSP cells.
  • a unique key may be a combination of entries from the NO, FILE NAME, and LINE columns located on the same row.
  • the pSP is checked: physical_properties, table_properties, table_properties. subquery, column definition. column, colurmi definition. datatype. If all CPDs are fulfilled, then the corresponding main SP is completed.
  • other RPVs contained in other non-mainstream SPs can be applied to the command to be converted to a syntactically and semantically correct command.
  • the formation of the CSP can be represented in the form of stages in which:
  • a joint venture is selected from the DBMS documentation
  • each CPN is a meta-description of the operations that are performed with the corresponding RBNF element.
  • the operations performed with the corresponding RBNF element may include, but are not limited to, a value verification operation, a value type verification operation, an element selection verification operation, an operation assigning a value to an element. Operations of logical union by functions OR or AND and operations of logical negation by NOT are applicable.
  • rBNF and rSP which is determined on the basis of the association of unique rBNF and rSP keys.
  • RDS dynamic structure
  • the first column corresponds to the number of entries in the RBNF, the second to the name of the RBNF (text BNF), the third to the entries in one of the RBNF cells, the fourth to the sign of the display of the element, the fifth to the sign of the choice of the element, the sixth to the sign of omission (deletion) of the element the seventh - to the type of operation on the element, the eighth - to the value specified for the element, the ninth - to the logical function for the operation, the tenth - to the value assigned to the element.
  • the correspondence of the unique keys rBNF and rSP is checked, due to which the correct SPs are assigned to the elements of rBNF.
  • FIG. 1 shows an exemplary embodiment of a method for generating syntactically and semantically correct instructions.
  • a method 100 for generating a syntactically and semantically correct command by processing the original CREATE TABLE command, which is an Oracle DBMS control command is described.
  • the conversion of at least one a Backus-Naura text form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command into at least one Backus-Naura relational form containing a meta recognized by the database management system (DBMS) - A description of the command to be converted to a syntactically and semantically correct command.
  • DBMS database management system
  • step 120 the conversion of at least one text-based semantic rule containing at least one restriction on the execution of a command to be converted into a syntactically and semantically correct command into at least one relational semantic rule containing at least one DBMS recognized restriction on the execution of a command to be converted into a syntactically and semantically correct command.
  • step 130 at least one command to be converted to a syntactically correct command is identified.
  • step 140 at least a basic semantic rule is assigned to the instruction identified in step 130 and is to be converted into a syntactically correct command, the basic semantic rule including at least one CPN.
  • an RDS is generated for the identified instruction to be converted to a syntactically correct instruction.
  • step 160 the elements of the basic semantic rule assigned at step 140 for the identified instruction to be converted to the syntactically correct instruction contained in the RDS generated for the identified instruction to be converted to the syntactically correct instruction are identified.
  • step 170 all elements of all the CSPs contained in the at least one basic semantic rule contained in the resulting dynamic structure generated for the identified team to be converted to are applied. syntactically and semantically correct command, to the identified command to be converted into syntactically and semantically correct command.
  • a syntactically and semantically correct instruction is generated on the basis of all elements of all CPNs applied to the identified instruction to be converted into a syntactically and semantically correct instruction from the at least one basic semantic rule contained in the RDS generated for an identified command to be converted to a syntactically and semantically correct command.
  • the stage of generating a relational description of the command syntax to be converted into a syntactically and semantically correct command can be performed before the start of the software stage.
  • the meta-description of the command syntax is identified; identification of elements of the meta description of command syntax; assigning to each of the mentioned elements a unique identifier (GO), the ID being assigned in the order of the location of the said elements in the meta-description of the command syntax; forming a table containing all of the mentioned elements, each of the mentioned elements is contained in one column of the table on different rows of the table; identification of opening structural elements and closing structural elements among the mentioned elements contained in the table; generating bidirectional links between the corresponding opening structural elements and the closing structural elements; generating unidirectional hierarchical relationships between the said opening elements and the corresponding opening element located at the previous nesting level, moreover, the generation of unidirectional hierarchical relations is carried out for each opening element located at any of the nesting levels, except for the first nesting level.
  • GO unique identifier
  • a stage can also be carried out the stage at which the generation of unidirectional lists of sets of meta-description elements of the command syntax metadata is located at the same nesting level, while unidirectional lists of sets of meta-description elements of the command syntax are limited to structural elements, while the sets of meta-description elements command syntax are located before or after the separator elements, and the generation of unidirectional lists of sets of elements of the meta description of the command syntax is carried out Appears for each level of nesting.
  • an exemplary embodiment of the apparatus of the present invention is shown, namely, apparatus 200 for generating syntactically and semantically correct instructions, which may include, but is not limited to: a personal computer, a laptop computer, a tablet computer, a palmtop computer, smartphone, thin client and the like.
  • the device is configured to access a data network and necessarily contains one or more processors 210, a computer-readable storage medium (memory) 220, input / output (I / O) modules 230 and input / output (I / O) ports 240.
  • an example environment 250 is stored in which, using computer instructions or codes stored in the device memory 220, a procedure can be generated to generate syntactically and semantically correct instructions.
  • Device memory 220 may be, but is not limited to: read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, CDROM, digital versatile disk (DVD) or other optical or holographic storage media; magnetic cassettes, magnetic tape, magnetic disk storage device or other magnetic storage devices, wave carriers or other storage medium that can be used to store the required information.
  • the device is also contains one or more processors 210 that are designed to execute computer instructions or codes stored in the device memory in order to ensure that the procedure for generating syntactically and semantically correct instructions is executed.
  • the computer commands executed by the device are commands that implement the steps described in this section of the application.
  • the device 200 is an example, and not limitation, of the user's personal computer.
  • This personal computer has an operating environment of 250, which as an example, and not limitation, is an operating system of the Windows or MacOS, or Unix family.
  • the device comprises a memory made in one of the above embodiments, in which a computer application is stored, which is a corresponding set of computer instructions or codes that the user can manipulate.
  • the procedure for generating a syntactically and semantically correct command is carried out through this application by selecting the command to be converted into a syntactically and semantically correct command.
  • such a command can be an Oracle DBMS management command.
  • the user himself selects the command to be converted into a syntactically and semantically correct command, and then follows the prompts of the application by which the syntactically and semantically correct command is generated.
  • the user also has the opportunity to create a template for generating a syntactically and semantically correct command (a generation script), or it can be automatically generated using a computer application or a block generating a script for generating a syntactically and semantically correct command according to the specified parameters.
  • device 200 is a thin client, in the aforementioned memory 220 does not store computer commands and program codes, and all the tasks are carried out on a server with which the device 200, which is presented as a thin client, is capable of communicating via a data network or other means of wired and wireless communication.
  • FIG. 3 illustrates an exemplary embodiment of a system 300 for generating syntactically and semantically correct instructions, which comprises an apparatus 200 for generating syntactically and semantically correct instructions, a data network 310, one or more servers 320, and a database or database engine 330.
  • Network 310 may include yourself, but not limited to, one or more local area networks (LAN) and / or wide area networks (WAN), or it can be an information and telecommunication network Internet, or an Intranet, or a virtual private network (VPN), etc. approved.
  • System 300 includes said apparatus 200 for generating syntactically and semantically correct instructions.
  • An apparatus 200 for generating syntactically and semantically correct instructions is used to perform a procedure for generating syntactically and semantically correct instructions.
  • the apparatus 200 for generating syntactically and semantically correct instructions is the apparatus 200 for generating syntactically and semantically correct instructions, which has been described previously with reference to FIG. 2.
  • the system 300 includes a server 320, which may be: a personal computer, a laptop computer, a tablet computer, a PDA, a smartphone, a database machine, and the like.
  • Server 320 provides data exchange control in system 300 and also provides data processing provided that one or more devices 200 for generating syntactically and semantically correct instructions are connected to it or when device 200 for generating syntactically and semantically correct instructions is a thin client, while all the computing power necessary to ensure the generation of syntactically and semantically correct instructions is located on server 320.
  • Server 320 also has the ability to provide a virtual computing environment (Virtual Machine) to allow interaction between device 200 for generating syntactically and semantically correct commands and a database (database engine) 330 (DB).
  • Virtual Machine Virtual Machine
  • a database 330 may be, but is not limited to: a hierarchical database, a network database, a relational database, an object database, an object-oriented database, an object-relational database, a spatial database, a combination of these two or more databases, and the like.
  • the database 330 stores data in memory, which can be accessed through the device 200 to generate syntactically and semantically correct instructions and the server 320.
  • the memory may be, in particular, memory, as described previously.
  • DB 330 is used for storing data, which is: instructions for the implementation of the procedure for generating syntactically and semantically correct instructions, DBMS documentation, text BNFs received by RBNFs, text SPs received by RSPs and other data necessary for the functioning of the system.

Abstract

The invention is based on the generation of syntactically and semantically correct commands, and consists in: converting Backus-Naur text form, which comprises a meta-description of a command which is to be converted, into a Backus-Naur relational form comprising a meta-description of the command mentioned, which meta-description is recognizable by a database management system; converting a text semantic rule, which comprises restrictions governing the execution of the command mentioned into a relational semantic rule comprising the restrictions governing the execution of the command mentioned, which restrictions are recognizable by the database management system; identifying the command mentioned; designating the basic semantic rule for the identified command, wherein the basic semantic rule includes at least one relational semantic rule; forming a resulting dynamic structure for the identified command; identifying elements of the basic semantic rule, which elements are present in the resulting dynamic structure; applying all of the elements of all of the relational semantic rules present in the basic semantic rule mentioned, which is present in the resulting dynamic structure, to the identified command; generating a syntactically and semantically correct command on the basis of all of the elements of all of the relational semantic rules applied to the identified command.

Description

СПОСОБ ГЕНЕРИРОВАНИЯ СИНТАКСИЧЕСКИ И СЕМАНТИЧЕСКИ ВЕРНЫХ КОМАНД  METHOD FOR GENERATING SYNTACTICALLY AND SEMANTICALLY TRUE COMMANDS
Область техники Technical field
Изобретение относится к решениям в области систем управления базами данных (СУБД), в частности к способу генерирования синтаксически и семантически верных команд.  The invention relates to solutions in the field of database management systems (DBMS), in particular to a method for generating syntactically and semantically correct instructions.
Предшествующий уровень техники  State of the art
Из уровня техники широко известны формы Бэкуса-Наура (БНФ) для описания синтаксиса языков программирования, в частности языка SQL (Structured Query Language), который используется для построения запросов к базам данных (БД) (см., например, URL: http ://docs . oracle . com/cd/E 11882 01 /server.112/e41084/ap_syntx002.htm#i63160 8)- The Backus-Naur (BNF) forms are widely known from the prior art for describing the syntax of programming languages, in particular the SQL (Structured Query Language), which is used to build queries to databases (DB) (see, for example, URL: http: / / docs. oracle. com / cd / E 11882 01 /server.112/e41084/ap_syntx002.htm#i63160 8) -
Команды СУБД Oracle для управления экземпляром базы данных описаны в книге Diana Lorentz et al. «Oracle Database SQL Language Reference)), llg Release 1 (11.1), August 2010 (URL: http://docs.oracle.com/cd/B28359_01/server.11 l/b28286.pdf). The Oracle DBMS commands for managing a database instance are described in Diana Lorentz et al. "Oracle Database SQL Language Reference)), llg Release 1 (11.1), August 2010 (URL: http://docs.oracle.com/cd/B28359_01/server.11 l / b28286.pdf).
Все команды СУБД Oracle являются элементами языка SQL, разработанным компанией Oracle. Для описания синтаксиса SQL команд используются синтаксические диаграммы (СД) и упрощенный вариант БНФ. Системы команд в других продуктах Oracle, например, PL/SQL, Backup and Recovery, Expdp, Impdp также могут быть описаны с помощью БНФ.  All Oracle DBMS commands are elements of the SQL language developed by Oracle. To describe the syntax of SQL commands, syntax diagrams (SD) and a simplified version of the BNF are used. Command systems in other Oracle products, for example, PL / SQL, Backup and Recovery, Expdp, Impdp, can also be described using BNF.
Кроме СУБД Oracle существуют другие примеры СУБД, для описания системы команд которых используются разновидности БНФ. Примером такой СУБД является Microsoft SQL Server (URL: http://msdn.nucrosoft.corn/enus/library/msl77563%28v=sql.90%29.aspx).  In addition to Oracle DBMS, there are other examples of DBMS, for the description of the command system which versions of the BNF are used. An example of such a DBMS is Microsoft SQL Server (URL: http: //msdn.nucrosoft.corn/enus/library/msl77563%28v=sql.90%29.aspx).
Из вышесказанного следует, что БНФ широко используются как средство описания синтаксиса систем команд современных СУБД. При этом функциональность современных СУБД такова, что число уникальных команд со всеми возможными вариантами их построения составляет несколько миллионов операторов. Для работы с таким большим количеством команд (запросов) необходимы автоматизированные процедуры генерации необходимых пользователю команд. From the above it follows that BNF are widely used as a means of describing the syntax of command systems of modern DBMSs. Moreover, the functionality of modern DBMS is such that the number of unique commands with all possible options for their construction is several million operators. To work with such a large number of commands (queries), automated procedures for generating the commands necessary for the user are necessary.
Ближайшим аналогом заявляемого технического решения является техническое решение, описанное в патенте US 5812840 A, G06F 17/30, SPEEDWARE Ltee./Ltd., 22.09.1998. В данном документе описан способ интерактивного построения синтаксически и семантически верного запроса для реляционной базы данных на основании выбора пользователя, при этом база данных имеет множество таблиц, каждая из таблиц, имеет множество столбцов и имеет заданную взаимосвязь с другими упомянутыми таблицами. Данный способ основывается на интерактивном взаимодействии пользователя и программы и не обеспечивает высокой степени точности, автоматизации процесса формирования синтаксически и семантически верных команд. Кроме того, в данном техническом решении отсутствует реализация автоматического способа формирования реляционного описания синтаксиса команды на основе мета-описания синтаксиса команды, позволяющее снизить объем вычислений, необходимых для формирования синтаксически и семантически верного запроса.  The closest analogue of the claimed technical solution is the technical solution described in patent US 5812840 A, G06F 17/30, SPEEDWARE Ltee./Ltd., 09/22/1998. This document describes a method for interactively constructing a syntactically and semantically correct query for a relational database based on a user’s choice, while the database has many tables, each of the tables has many columns and has a predetermined relationship with the other tables mentioned. This method is based on the interactive interaction of the user and the program and does not provide a high degree of accuracy, automation of the process of forming syntactically and semantically correct commands. In addition, in this technical solution, there is no implementation of an automatic method for generating a relational description of command syntax based on a meta-description of command syntax, which allows reducing the amount of computation necessary to form a syntactically and semantically correct request.
Раскрытие изобретения  Disclosure of invention
Целью настоящего изобретения является обеспечение способа, устройства и системы автоматической генерации синтаксически и семантически верных команд, обеспечивающих генерацию синтаксически и семантически верных команд с высокой степенью точности и автоматизации.  The aim of the present invention is the provision of a method, device and system for the automatic generation of syntactically and semantically correct instructions, providing the generation of syntactically and semantically correct instructions with a high degree of accuracy and automation.
Техническим результатом является обеспечение автоматизации и повышение точности генерирования команд СУБД и снижение объема вычислений, требуемого для генерирования команд СУБД.  The technical result is to provide automation and improve the accuracy of generating DBMS commands and reduce the amount of computation required to generate DBMS commands.
Варианты осуществления настоящего изобретения относятся к способам, устройствам и системам для генерирования синтаксически и семантически верных команд, обеспечивающих выполнение последовательных этапов, на которых в предпочтительном варианте осуществления настоящего изобретения осуществляется: Embodiments of the present invention relate to methods, devices, and systems for generating syntactically and semantically correct instructions for executing successive stages in which in a preferred embodiment of the present invention is carried out:
a) преобразование, по меньшей мере, одной текстовой формы Бэкуса- Наура, содержащей мета-описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое системой управления базой данных (СУБД) мета-описание команды, подлежащей преобразованию в синтаксически и семантически верную команду;  a) converting at least one Backus-Naur text form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, into at least one Backus-Naur relational form containing recognized by the database management system (DBMS) meta-description of the command to be converted into a syntactically and semantically correct command;
b) преобразование, по меньшей мере, одного текстового семантического правила, содержащего, по меньшей мере, одно ограничение на исполнение команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одно реляционное семантическое правило, содержащее, по меньшей мере, одно распознаваемое СУБД ограничение на исполнение команды, подлежащей преобразованию в синтаксически и семантически верную команду;  b) converting at least one text-based semantic rule containing at least one restriction on the execution of a command to be converted into a syntactically and semantically correct command into at least one relational semantic rule containing at least , one recognized DBMS restriction on the execution of a command to be converted into a syntactically and semantically correct command;
c) идентификация, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду;  c) identification of at least one command to be converted to a syntactically and semantically correct command;
d) назначение, по меньшей мере, основного семантического правила для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, причем основное семантическое правило включает, по меньшей мере, одно реляционное семантическое правило;  d) designating at least a basic semantic rule for an identified instruction to be converted to a syntactically and semantically correct instruction, the basic semantic rule including at least one relational semantic rule;
e) формирование результирующей динамической структуры для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду;  e) the formation of the resulting dynamic structure for the identified team to be converted into a syntactically and semantically correct command;
f) идентификация элементов упомянутого основного семантического правила для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, содержащихся в результирующей динамической структуре, сформированной для з идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду; f) the identification of the elements of the mentioned basic semantic rule for the identified command to be converted into syntactically and semantically correct command contained in the resulting dynamic structure formed for an identified command to be converted to a syntactically and semantically correct command;
g) применение всех элементов всех реляционных семантических правил, содержащихся в упомянутом, по меньшей мере, одном основном семантическом правиле, содержащемся в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду;  g) applying all the elements of all relational semantic rules contained in the at least one basic semantic rule contained in the resulting dynamic structure generated for the identified command to be converted to a syntactically and semantically correct command to the identified command to be converted to syntactically and semantically correct command;
h) генерирование синтаксически и семантически верной команды на основе примененных к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду, всех элементов всех реляционных семантических правил, из упомянутого, по меньшей мере, одного основного семантического правила, содержащегося в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду.  h) the generation of a syntactically and semantically correct command based on all elements of all relational semantic rules applied to the identified command to be converted into a syntactically and semantically correct command from the at least one basic semantic rule contained in the resulting dynamic structure generated for an identified command to be converted to a syntactically and semantically correct command.
Несмотря на то, что в примерном варианте осуществления изобретения перечисленные компьютерные команды написаны на языке PL/SQL, не следует считать, что данный пример осуществления изобретения ограничивает написание перечисленных компьютерных команд только данным языком программирования. В действительности перечисленные команды могут быть написаны на любом известном или вновь созданном языке программирования.  Despite the fact that in an exemplary embodiment of the invention, the listed computer instructions are written in PL / SQL, it should not be considered that this embodiment of the invention limits the writing of the listed computer instructions only to this programming language. In fact, the listed commands can be written in any well-known or newly created programming language.
Краткое описание чертежей  Brief Description of the Drawings
На Фиг. 1 проиллюстрированы основные этапы способа генерирования синтаксически и семантически верных команд.  In FIG. 1 illustrates the main steps of a method for generating syntactically and semantically correct instructions.
На Фиг. 2 проиллюстрирован примерный вариант вычислительного устройства, пригодного для осуществления способа генерирования синтаксически и семантически верных команд. На Фиг. 3 проиллюстрирован примерный вариант системы, пригодной для осуществления способа генерирования синтаксически и семантически верных команд. In FIG. 2 illustrates an exemplary embodiment of a computing device suitable for implementing a method for generating syntactically and semantically correct instructions. In FIG. 3 illustrates an exemplary embodiment of a system suitable for implementing a method for generating syntactically and semantically correct instructions.
Варианты осуществления изобретения  Embodiments of the invention
Описанные в данном разделе возможные осуществления вариантов настоящего изобретения представлены на примере формирования синтаксической конструкции create table для описания команды CREATE TABLE, представляющей собой команду управления СУБД Oracle. Способ, устройство или система могут быть применены для любой команды управления любой СУБД или запроса любой СУБД, которые могут быть описаны с помощью метаязыка БНФ и к которым могут быть применены семантические правила. Для более подробного и детального раскрытия действий, выполняемых способом, необходимо подробнее рассмотреть свойства БНФ.  The possible implementations of the embodiments of the present invention described in this section are presented as an example of creating a create table syntax to describe a CREATE TABLE command, which is an Oracle DBMS control command. A method, device, or system can be applied to any command to control any DBMS or query any DBMS, which can be described using the BNF metalanguage and to which semantic rules can be applied. For a more detailed and detailed disclosure of the actions performed by the method, it is necessary to consider the properties of the BPF in more detail.
Метаязык БНФ является стандартным языком для описания синтаксиса языков программирования.  The BNF metalanguage is the standard language for describing the syntax of programming languages.
Упрощенный вариант БНФ включает следующие символы и соглашения:  A simplified version of the BPF includes the following symbols and conventions:
«[» и «]» - скобки, ограничивающие необязательные элементы;  “[” And “]” are brackets that limit optional elements;
«{» и «}» - фигурные скобки, ограничивающие только один требуемый элемент;  "{" And "}" are braces that limit only one item;
«|» - вертикальная черта, отделяющая альтернативы внутри скобок или фигурных скобок (разделитель);  "|" - a vertical bar separating alternatives inside brackets or curly braces (separator);
«...» - эллипсис, указывающий на то, что синтаксический элемент перед ним может быть повторен (признак повторяемости);  “...” is an ellipsis indicating that the syntax element in front of it can be repeated (sign of repeatability);
«разделители» - разделители отличающиеся от скобок, фигурных скобок, вертикальной черты и эллипсиса, которые должны быть введены как показано.  “Delimiters” are delimiters that differ from brackets, braces, vertical bars and ellipses, which must be entered as shown.
Далее под структурными элементами (СЭ) понимаются пары соответствующих скобок «{», «}» и «[», «]». СЭ и вертикальная черта «|» являются вспомогательными. Они не являются элементами того языка программирования, который описывается с помощью метаязьпса БНФ. Кроме СЭ, мета-описание языка программирования включает терминальные элементы (ТЭ) и нетерминальные элементы (НТЭ). ТЭ, или ключевые слова, описываются полужирным шрифтом и верхним регистром. НТЭ описываются нижним регистром и в процессе генерирования команды заменяются именем или значением. Необходимость такой записи обусловлена функционированием СУБД, которая распознает команды, основываясь на форме их записи - синтаксисе. Команды, записанные с нарушением требований, изложенных в документации к СУБД, не будут распознаны и обработаны СУБД. Это обусловлено тем, что при обработке команд СУБД, команды будут переведены в машинный код, который будет обработан процессором СУБД. В том случае, если синтаксис команд, записанных на языке высокого уровня будет нарушен, такие команды, соответственно будут переведены в неправильный машинный код, который не будет обработан процессором СУБД. Далее под элементами (ЭЛ) понимаются ТЭ или НТЭ, или разделитель. Further, structural elements (SE) are understood as pairs of corresponding brackets "{", "}" and "[", "]". SE and the vertical bar "|" are auxiliary. They are not elements of the programming language that is described using the BNF metalanguage. In addition to SE, the meta-description of the programming language includes terminal elements (TE) and non-terminal elements (NTE). TEs, or keywords, are described in bold and uppercase. NTEs are described in lower case and are replaced by a name or value during the generation of commands. The need for such a record is due to the functioning of the DBMS, which recognizes commands based on the form of their record - the syntax. Commands written in violation of the requirements set forth in the documentation for the DBMS will not be recognized and processed by the DBMS. This is due to the fact that when processing DBMS commands, the commands will be translated into machine code, which will be processed by the DBMS processor. In the event that the syntax of commands written in a high-level language is violated, such commands will accordingly be translated into incorrect machine code, which will not be processed by the DBMS processor. Further, under the elements (EL) are meant TE or NTE, or a separator.
Для целей более полного раскрытия настоящего изобретения необходимо рассмотреть такой элемент БНФ, как ячейка.  For the purposes of a more complete disclosure of the present invention, it is necessary to consider such a BNF element as a cell.
Ячейка - подмножество БНФ одного уровня вложенности, ограниченное СЭ или вертикальной чертой. Символ «....» внутри ячейки обозначает любую верную БНФ. Помимо этого, существуют так же вырожденные ячейки, внутри которых нет ЭЛ, и есть только СЭ. В случае вырожденной ячейки два внешних СЭ не содержат ни одного ЭЛ, только СЭ, а третий СЭ содержит ЭЛ.  A cell is a subset of BNF of one level of nesting, limited by FE or vertical bar. The symbol "...." inside the cell denotes any valid BNF. In addition, there are also degenerate cells, inside which there is no EL, and there is only SE. In the case of a degenerate cell, two external SCs do not contain any EL, only SC, and the third SC contains EL.
Для целей более полного раскрытия настоящего изобретения необходимо рассмотреть такое явление как уровень вложенности (УВ).  For the purposes of a more complete disclosure of the present invention, it is necessary to consider such a phenomenon as the level of nesting (HC).
Первый УВ (УВ1) соответствует ЭЛ и СЭ и представляет собой уровень SQL команды, генерирование которой осуществляется в соответствии с настоящим изобретением. Содержимое СЭ в свою очередь относится ко  The first HC (HC1) corresponds to EL and SE and represents the level of the SQL command, the generation of which is carried out in accordance with the present invention. The content of SE in turn refers to
б второму УВ (УВ2). ЭЛ «АААА», «bbbb», «dddd» и разделителю «|» соответствует УВ2. ЭЛ следующего вложенного СЭ, а именно ЭЛ «СССС», «хххх» и «|», соответствует третий УВ (УВЗ). ЭЛ «ΥΥΥΥ» соответствует четвертый УВ (УЕЗД). УВ1 соответствует вырожденная ячешса, так как на этом уровне нет СЭ. b the second HC (HC2). EL “AAAA”, “bbbb”, “dddd” and the separator “|” corresponds to UV2. The EL of the next embedded SE, namely the EL “SSSS”, “xxxx” and “|”, corresponds to the third HC (UVZ). EL "ΥΥΥΥ" corresponds to the fourth HC (UEZD). UV1 corresponds to degenerate cellular, since there is no SC at this level.
На УВ2 находятся следующие ячейки:  The following cells are located on HC2:
Ячейка 1, ограниченная СЭ «{» и «|»;  Cell 1, bounded by the FE "{" and "|";
Ячейка 2, ограниченная СЭ «|» и «}».  Cell 2, bounded by the SE “|” and “}”.
На УВЗ находятся следующие ячейки:  The following cells are located at UVZ:
Ячейка 3, ограниченная «[» и «|»;  Cell 3 bounded by "[" and "|";
Ячейка 4, ограниченная «|» и «]».  Cell 4, limited to "|" and "]".
На УВ4 находится следующая ячейка:  On UV4 there is the following cell:
Ячейка 5, ограниченная - «{» и «}».  Cell 5, limited - "{" and "}".
В данном примере СЭ «{», «}» и «[», «]» взаимозаменяемы.  In this example, the SEs “{”, “}” and “[”, “]” are interchangeable.
Далее для целей более полного раскрытия настоящего изобретения, необходимо рассмотреть реляционные БНФ (рБНФ).  Further, for the purpose of more fully disclosing the present invention, it is necessary to consider relational BNF (rBNF).
В настоящем изобретении рБНФ используются как элементы автоматизированной системы для генерирования всего множества синтаксически верных команд управления СУБД и содержатся в основном семантическом правиле, назначаемом для команды, подлежащей преобразованию в синтаксически и семантически верную команду. Однако только синтаксически верная команда не будет выполнена СУБД корректно. Помимо верного синтаксиса команд, необходимо также применение к такой команде верных семантических правил. Семантические правила включают в себя уточнения и исключения, которые используются при обработке соответствующих команд. Эти семантические правила так же должны быть формализованы (переведены в реляционную форму), их применение должно быть автоматизировано для обеспечения генерирования синтаксически и семантически верных команд.  In the present invention, RBNFs are used as elements of an automated system to generate the entire set of syntactically correct DBMS control commands and are contained in the basic semantic rule assigned to a command to be converted to a syntactically and semantically correct command. However, only the syntactically correct command will not execute the DBMS correctly. In addition to the correct command syntax, it is also necessary to apply the correct semantic rules to such a command. Semantic rules include refinements and exceptions that are used in processing the corresponding commands. These semantic rules should also be formalized (translated into a relational form), their application should be automated to ensure the generation of syntactically and semantically correct instructions.
При осуществлении способа по настоящему изобретению происходит преобразование текстовых БНФ в реляционные БНФ. При таком преобразовании сохраняются все СЭ и все ЭЛ, которые ранее содержались в текстовых БНФ. Вложенность СЭ БНФ представляется иерархическими связями между записями реляционной таблицы, в виде которой представлена рБНФ. Начало и конец СЭ представляются ссылками между соответствующими записями таблицы. Ячейки одного УВ представляются однонаправленным списком всех СЭ для каждого УВ по отдельности. Такими СЭ применительно к рБНФ являются: When implementing the method of the present invention occurs conversion of text BNF to relational BNF. With such a conversion, all FE and all EL that were previously contained in text BPFs are saved. Nesting of the BNF SE is represented by hierarchical relationships between the records of the relational table, in the form of which the RBNF is presented. The start and end of the SE are represented by links between the corresponding entries in the table. Cells of one HC are represented by a unidirectional list of all SCs for each HC separately. These SEs for rbnf are:
открывающие элементы (ОЭ): «{» или «[», или «|»; и  opening elements (OE): "{" or "[", or "|"; and
закрывающие элементы (ЗЭ): «}» или «]», или «|».  closing elements (WE): "}" or "]", or "|".
Для признака повторяемости формируется отдельный атрибут (столбец) в рБНФ. Для повторяющегося СЭ этому атрибуту присваивается непустое значение.  For the sign of repeatability, a separate attribute (column) is generated in the RBNF. For a repeating SC, this attribute is assigned a non-empty value.
Процесс преобразования текстовой БНФ в рБНФ, включает в себя этапы:  The process of converting text BNF to RBNF includes the steps of:
аа) идентификации БНФ, на котором идентифицируется текстовая БНФ, подлежащая преобразованию в рБНФ, и каждому элементу текстовой БНФ (каждой записи текстовой БНФ) присваивается уникальный идентификатор aa) identification of the BNF, which identifies the text BNF to be converted into rBNF, and each element of the text BNF (each record of the text BNF) is assigned a unique identifier
(ID); (ID);
bb) формирования промежуточной таблицы, содержащей все элементы текстовой БНФ;  bb) the formation of an intermediate table containing all the elements of the text BNF;
сс) разбиения элементов промежуточной таблицы на отдельные СЭ, ТЭ, НТЭ, разделители и признаки повторяемости;  cc) dividing elements of the intermediate table into separate SE, TE, NTE, separators and signs of repeatability;
dd) формирования из полученных элементов итоговой таблицы, содержащей множество записей, каждая из которых содержит только один полученный элемент;  dd) the formation of the resulting elements of the final table containing many records, each of which contains only one received element;
ее) идентификации всех ОЭ и ЗЭ и генерирование ссылок (связей) между соответствующими ОЭ и ЗЭ;  her) the identification of all MA and SE and the generation of links (links) between the corresponding MA and GE;
ff) генерирования иерархических ссылок (связей) для всех вложенных СЭ, причем генерирование иерархических ссылок осуществляется таким образом, что вложенный СЭ ссылается на СЭ, внутри которого он расположен; ff) the generation of hierarchical links (links) for all nested SEs, and the generation of hierarchical links is carried out as the way that the embedded SE refers to the SE inside which it is located;
gg) идентификации всех признаков повторяемости;  gg) identification of all signs of repeatability;
hh) присвоения всем СЭ, расположенным перед признаком повторяемости иного, отличного от идентифицированного, признака повторяемости и удаления всех идентифицированных ранее признаков повторяемости, за исключением вновь присвоенных;  hh) assignment to all SCs located in front of the sign of repeatability of a sign of repeatability other than identified and the removal of all previously identified signs of repeatability, with the exception of newly assigned;
ii) формирование однонаправленного списка ячеек.  ii) forming a unidirectional list of cells.
На этапе преобразования текстовой БНФ в рБНФ осуществляется идентификация всех СЭ и ЭЛ, содержащихся в текстовой БНФ. В данном конкретном неограничивающем объем охраны примере, ЭЛ являются ЭЛ «CREATE», «GLOBAL», «TEMPORARY», «TABLE», «schema.», «table», «relational_table», «object_table», «XMLType_table», ограниченные соответствующими СЭ - «[»и «]» для «GLOBAL» и «TEMPORARY», другие «[» и «]» для «schema.», «{» и «}» для вложенных альтернативных ЭЛ «relational_table», «object_table», «XMLType_table» и разделители «|» для них. Столбец Ю содержит уникальный идентификатор записи (ЭЛ), столбец FILE_NAME содержит имя преобразовываемой БНФ, столбец LINE содержит элемент БНФ (запись БНФ), столбец NXT содержит для открывающей структурной скобки ссылку на закрывающую структурную скобку, а для закрывающей структурной скобки - ссылку на открывающую структурную скобку, столбец PREV содержит ссылку на внешний СЭ или 0 для самого внешнего СЭ, столбец NREF содержит ссылку на предыдущий ограничительный элемент ячейки. Если СЭ является повторяющимся, соответствующей ячейке в столбце DEEP присваивается значение 1. Кроме того, каждая рБНФ обладает уникальным ключом, с каждым элементом которого может быть ассоциирован соответствующий элемент уникальных ключей реляционных семантических правил (рСП), о которых будет подробно рассказано далее.  At the stage of converting textual BNF to rBNF, all SE and EL contained in the textual BNF are identified. In this specific non-limitative example, ELs are CREATE, GLOBAL, TEMPORARY, TABLE, schema., Table, relational_table, object_table, XMLType_table limited by the corresponding SE - "[" and "]" for "GLOBAL" and "TEMPORARY", other "[" and "]" for "schema.", "{" And "}" for nested alternative EL "relational_table", "object_table" , "XMLType_table" and delimiters "|" for them. Column U contains a unique record identifier (EL), column FILE_NAME contains the name of the converted BNF, column LINE contains the element BNF (record BNF), column NXT contains a link to the closing structure bracket for the opening structure bracket, and a link to the opening structure bracket parenthesis, the PREV column contains a link to the external SE or 0 for the most external SE, the NREF column contains a link to the previous cell restriction. If the FE is repeating, the corresponding cell in the DEEP column is assigned the value 1. In addition, each RBNF has a unique key, each element of which can be associated with a corresponding element of unique keys of relational semantic rules (RSF), which will be described in detail below.
В общем виде рБНФ содержит следующие атрибуты: имя рБНФ - название конкретной команды или фрагмент документации СУБД (название текстовой БНФ); In general terms, the RBNF contains the following attributes: RBNF name - the name of a particular team or a fragment of the DBMS documentation (the name of the text BNF);
тело рБНФ - формализованная запись текстовой БНФ;  rBNF body - a formalized entry of text BNF;
уникальный ключ рБНФ - любой уникальный ключ, который может быть сформирован из одной или более записей, содержащихся в рБНФ.  rBNF unique key - any unique key that can be formed from one or more entries contained in the rbnf.
В частности, таким ключом может быть ключ, сформированный из номера строки (ГО), имени рБНФ (текстовой БНФ) и записи в одной из ячеек рБНФ. Например, уникальным ключом может являться комбинация записей из столбцов П) и FILE NAME и LINE, расположенных на одной строке.  In particular, such a key can be a key formed from the line number (GO), the name rBNF (text BNF) and the record in one of the cells rBNF. For example, a unique key may be a combination of records from columns P) and FILE NAME and LINE located on the same row.
При выполнении процедуры генерирования синтаксически и семантически верной команды, над рБНФ могут выполняться следующие действия:  When performing the procedure for generating syntactically and semantically correct commands, the following actions can be performed on RBNF:
для необязательных СЭ (СЭ, заключенных в скобки «[» и «]») может быть применим пропуск, при этом такой СЭ может быть удален из рБНФ; для СЭ, являющегося повторяющимся (СЭ, записанный перед признаком повторяемости «...») может быть применено дублирование, создающее копию такого СЭ и записывающего ее следом за исходным СЭ; для ЭЛ может быть применен выбор, при этом ячейка, в которую записан ЭЛ определяется как выбранная, а СЭ, в котором находится ячейка заменяется выбранной ячейкой, при этом выбранная ячейка переходит на более высокий УВ;  for optional SCs (SCs enclosed in brackets “[” and “]”), a pass may be applicable, while such SCs may be removed from the RBNF; for a SC that is repeating (a SC recorded before the sign of repeatability “...”), duplication can be applied, creating a copy of such a SC and recording it after the initial SC; for EL, a choice can be applied, while the cell in which the EL is written is determined to be selected, and the SE in which the cell is located is replaced by the selected cell, and the selected cell goes to a higher HC;
для НТЭ, который является рБНФ, может быть применена замена НТЭ телом рБНФ;  for an STE, which is an RBNF, the substitution of an STE with an RBNF body can be applied;
для НТЭ, который не является БНФ, может быть применена процедура присвоения значения;  for an STE that is not a BPF, a value assignment procedure may be applied;
если для ЭЛ определены рСП, то к такому ЭЛ может быть применена процедура вывода всех рСП, сопровождающаяся указанием на результат выполнения каждого рСП;  if rSP are defined for EL, then the procedure for deriving all rSP can be applied to such EL, accompanied by an indication of the result of each rSP;
для ЭЛ может быть применена процедура вывода фрагмента документации СУБД, который относится к такому ЭЛ; ю на основе списка ЭЛ, находящихся на УВ1 может быть сгенерирована SQL команда. for EL, the procedure for outputting a DBMS documentation fragment that relates to such EL can be applied; Yu Based on the list of ELs located on HC1, an SQL command can be generated.
Более подробно, процесс генерирования синтаксически и семантически верной SQL команды может быть представлен в виде цикла:  In more detail, the process of generating syntactically and semantically correct SQL commands can be represented as a loop:
ааа) на УВ1 выбираются НТЭ, являющиеся именами БНФ;  aaa) at UV1, NTEs that are the names of the BPF are selected;
bbb) выбранные НТЭ заменяются соответствующими телами БНФ;  bbb) selected NTEs are replaced by the corresponding BNF bodies;
ссс) если на УВ2 есть необязательный СЭ, то он может быть пропущен (удален);  ccc) if there is an optional SC on UV2, then it can be skipped (deleted);
ddd) если на УВ2 есть повторяющийся СЭ, тогда для него может быть сгенерирована копия повторяющегося СЭ, которая вставляется вслед за текущим.  ddd) if there is a repeating SE on UV2, then a copy of the repeating SE can be generated for it, which is inserted after the current one.
еее) так как УВ2 в общем случае состоит из нескольких ячеек, может быть осуществлен выбор требуемых ячеек;  eee) since HC2 generally consists of several cells, the selection of the required cells can be made;
eeel) если выбираемая ячейка оказывается вырожденной, выбор осуществляется на один УВ ниже и до тех пор, пока не будет выбрана ячейка, содержащая ЭЛ;  eeel) if the selected cell turns out to be degenerate, the choice is made one HC below and until the cell containing the EL is selected;
еее2) после выбора ячейки, содержащей ЭЛ, все вырожденные ячейки, кроме вырожденных ячеек УВ2, удаляются, а выбранная ячейка, заменят собой СЭ, в котором она находится, и таким образом переходит на один УВ выше; ee2) after selecting a cell containing EL, all degenerate cells, except for degenerate cells of HC2, are deleted, and the selected cell will replace the SC in which it is located, and thus goes one HC higher;
) если на УВ2 есть ячейка, содержащая ЭЛ, которая может быть выбрана, осуществляется возврат к шагу ссс), если нет, то осуществляется переход к шагу ggg);  ) if on UV2 there is a cell containing EL that can be selected, a return is made to step ccc); if not, then a transition is made to step ggg);
ggg) если на УВ1 есть НТЭ, который является именем БНФ, то осуществляется переход к шагу ааа), если нет, то цикл формирования SQL команды завершается.  ggg) if there is an NTE on UV1, which is the name of the BNF, then go to step aaa), if not, then the SQL command generation cycle ends.
Таким образом, такой способ генерирования синтаксически и семантически верной команды может быть применен для любой конечной БНФ, т.к. выбор ЭЛ приводит к переносу ячейки, содержащей ЭЛ, на УВ выше. Далее для целей более полного раскрытия настоящего изобретения, необходимо рассмотреть семантические правила. Семантические правила (СП)— это фрагменты текста документации СУБД, которые накладывают дополнительные ограничения на исполнение (выполнение) команд в СУБД. Главная особенность рБНФ состоит в том, что она содержит записи всех СЭ, ТЭ, НТЭ, разделители и признаки повторяемости, которые представлены в документации СУБД. Это позволяет использовать их при создании рСП. Thus, this method of generating syntactically and semantically correct commands can be applied to any final BNF, because the choice of EL leads to the transfer of a cell containing EL to the HC above. Further, for the purpose of more fully disclosing the present invention, it is necessary to consider semantic rules. Semantic rules (SP) are fragments of the text of the DBMS documentation, which impose additional restrictions on the execution (execution) of commands in the DBMS. The main feature of the RBNF is that it contains records of all SE, TE, STE, separators and repeatability characteristics, which are presented in the DBMS documentation. This allows you to use them when creating a CSP.
Например, для команды create table/column definition в документации СУБД Oracle существует указание:  For example, for the create table / column definition command in the Oracle DBMS documentation, there is an indication:
"If you specify AS subquery when creating an index-organized table, then you must specify column, and you must omit data type ".  "If you specify AS subquery when creating an index-organized table, then you must specify column, and you must omit data type."
В данном конкретном неограничивающем объем охраны примере, кавычками выделен текстовый фрагмент документации СУБД Oracle, определяющий дополнительные условия, выполнение которых необходимо для корректной работы команды create table/colimm definition, представляющей собой команду управления СУБД Oracle. Такие семантические правила сами по себе не могут быть распознаны СУБД и должны быть формализованы и представлены в виде рСП. Основное СП, назначаемое для команды, подлежащей преобразованию в синтаксически и семантически верную команду, может быть формализовано и представлено в виде совокупности рСП. Первый столбец содержит номер элемента рСП, второй столбец - ГО правила, третий столбец - номер элемента рБНФ, четвертый столбец - имя рСП, такое же как у рБНФ, к которому рСП применяется, пятый столбец - соответствующий ТЭ или НТЭ, к которому применяется правило, шестой столбец - возможные операции над элементом, за счет которых может быть осуществлен выбор элемента, к которому применяется элемент рСП, при этом элемент может быть проверен на наличие значения, присвоенного элементу, отображаемое в седьмом столбце, восьмой столбец - логическая функция, девятый столбец - комментарий, десятый столбец - фрагмент документации (в данном конкретном примере не используется), одиннадцатый столбец - указание на команду, к которой применяется правило, двенадцатый столбец - статус правила, тринадцатый столбец - признак активности правила. Кроме того, каждое рСП обладает уникальным ключом, с которым может быть ассоциирована соответствующая рБНФ. Как уже упоминалось выше, уникальный ключ рСП - любой уникальный ключ, который может быть сформирован из одной или более записей, содержащихся в рСП, ассоциированный с соответствующей рБНФ. В частности, таким ключом может быть ключ, сформированный из номера строки (ГО) в рБНФ, имени рБНФ (текстовой БНФ) и записи в одной из ячеек рСП. Например, для рСП, уникальным ключом может являться комбинация записей из столбцов NO, FILE NAME и LINE, расположенных на одной строке. Таким образом, при выполнении процедуры генерирования синтаксически и семантически верной команды осуществляется проверка выполнения каждого правила, содержащегося в рСП. Например, для команды create table выполняется проверка рСП physical_properties, table_properties, table_properties. subquery , column definition. column, colurmi definition. datatype . Если все рСП выполнены, значит выполнено соответствующее основное СП. Кроме того, помимо рСП, содержащихся в назначенном основном СП, к команде, подлежащей преобразованию в синтаксически и семантически верную команду могут применяться и другие рСП, содержащиеся в других, неосновных СП. In this specific example, which does not limit the scope of protection, the text fragment of the Oracle DBMS documentation is marked with quotation marks, which defines additional conditions that must be met for the create table / colimm definition command to work correctly, which is the Oracle DBMS control command. Such semantic rules in themselves cannot be recognized by the DBMS and must be formalized and presented in the form of a CSP. The main SP assigned to the team to be converted to a syntactically and semantically correct command can be formalized and represented as a set of pSP. The first column contains the number of the RPN element, the second column is the number of the RBNF element, the fourth column is the name of the RPN, the same as the RBNF to which the RPN is applied, the fifth column is the corresponding TE or NTE to which the rule applies, sixth column - possible operations on an element, due to which an element can be selected to which an element of CPD is applied, while the element can be checked for the value assigned to the element displayed in the seventh column, the eighth column is a logical nktsiya ninth column - comment tenth column - fragment documentation (in this particular example is not used), the eleventh column is an indication of the command to which the rule applies, the twelfth column is the rule status, the thirteenth column is a sign of rule activity. In addition, each CPN has a unique key with which the corresponding RBNF can be associated. As mentioned above, a unique rSP key is any unique key that can be generated from one or more records contained in a rSP associated with the corresponding rBNF. In particular, such a key can be a key generated from the line number (GO) in rBNF, the name rBNF (text BNF), and the record in one of the rSP cells. For example, for a CSP, a unique key may be a combination of entries from the NO, FILE NAME, and LINE columns located on the same row. Thus, when executing the procedure for generating syntactically and semantically correct instructions, the execution of each rule contained in the CPN is checked. For example, for the create table command, the pSP is checked: physical_properties, table_properties, table_properties. subquery, column definition. column, colurmi definition. datatype. If all CPDs are fulfilled, then the corresponding main SP is completed. In addition, in addition to the RPNs contained in the assigned main SP, other RPVs contained in other non-mainstream SPs can be applied to the command to be converted to a syntactically and semantically correct command.
В общем виде формирование рСП может быть представлено в виде этапов, на которых:  In general terms, the formation of the CSP can be represented in the form of stages in which:
аааа) из документации СУБД выбирается СП;  aaaa) a joint venture is selected from the DBMS documentation;
bbbb) формируется список рСП, для реализации выбранного СП;  bbbb) a list of CSPs is formed to implement the selected joint venture;
сссс) каждое рСП представляет собой мета-описание операций, которые выполняются с соответствующим элементом рБНФ.  SSSS) each CPN is a meta-description of the operations that are performed with the corresponding RBNF element.
Операции, выполняемые с соответствующим элементом рБНФ могут быть, но не ограничиваться, операцией проверки значения, операцией проверки типа значения, операцией проверки выбора элемента, операцией присваивания значения элементу. К операциям применимы операции логического объединения функциями OR или AND и операции логического отрицания функцией NOT. Существует соответствие между рБНФ и рСП, которое определяется на основе ассоциирования уникальных ключей рБНФ и рСП. Во время генерирования синтаксически и семантически верной команды осуществляется соединение рБНФ и рСП, результатом которого является создание результирующей динамической структуры (РДС). РДС может быть получена с помощью операции соединения таблиц, представляющих собой рБНФ и рСП. Такая операция является общепринятой операцией над таблицами и, соответственно, дополнительно не описывается. В данной РДС первый столбец соответствует номеру записи в рБНФ, второй - имени рБНФ (текстовой БНФ), третий - записи в одной из ячеек рБНФ, четвертый - признаку отображения элемента, пятый - признаку выбора элемента, шестой - признаку пропуска (удаления) элемента, седьмой - типу операции над элементом, восьмой - значению заданному для элемента, девятый - логической функции для операции, десятый - значению, присвоенному элементу. При соединении рБНФ и рСП осуществляется проверка соответствия уникальных ключей рБНФ и рСП, за счет чего элементам рБНФ назначаются верные СП. При осуществлении процедуры генерирования синтаксически и семантически верной команды, из множества РДС выбираются элементы рСП, соответствующие командам, подлежащим преобразованию в синтаксически и семантически верные команды. После этого осуществляется проверка выполнения элементов рСП и генерируется SQL команда. The operations performed with the corresponding RBNF element may include, but are not limited to, a value verification operation, a value type verification operation, an element selection verification operation, an operation assigning a value to an element. Operations of logical union by functions OR or AND and operations of logical negation by NOT are applicable. There is a correspondence between rBNF and rSP, which is determined on the basis of the association of unique rBNF and rSP keys. During the generation of a syntactically and semantically correct command, the RBNF and the RSP are connected, the result of which is the creation of the resulting dynamic structure (RDS). RDS can be obtained using the operation of joining tables representing rBNF and RSP. Such an operation is a common operation on tables and, accordingly, is not further described. In this RDS, the first column corresponds to the number of entries in the RBNF, the second to the name of the RBNF (text BNF), the third to the entries in one of the RBNF cells, the fourth to the sign of the display of the element, the fifth to the sign of the choice of the element, the sixth to the sign of omission (deletion) of the element the seventh - to the type of operation on the element, the eighth - to the value specified for the element, the ninth - to the logical function for the operation, the tenth - to the value assigned to the element. When connecting rBNF and rSP, the correspondence of the unique keys rBNF and rSP is checked, due to which the correct SPs are assigned to the elements of rBNF. When the procedure for generating syntactically and semantically correct instructions is carried out, from the set of RDS, elements of the PSD corresponding to the commands to be converted into syntactically and semantically correct instructions are selected. After that, the execution of the pSP elements is checked and an SQL command is generated.
На фиг. 1 показан примерный вариант осуществления способа генерирования синтаксически и семантически верных команд. В качестве примера, но не ограничения, описывается способ 100 генерирования синтаксически и семантически верной команды путем обработки исходной команды CREATE TABLE, представляющей собой команду управления СУБД Oracle. На этапе ПО выполняется преобразование, по меньшей мере, одной текстовой формы Бэкуса-Наура, содержащей мета-описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое системой управления базой данных (СУБД) мета-описание команды, подлежащей преобразованию в синтаксически и семантически верную команду. На этапе 120 выполняется преобразование, по меньшей мере, одного текстового семантического правила, содержащего, по меньшей мере, одно ограничение на исполнение команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одно реляционное семантическое правило, содержащее, по меньшей мере, одно распознаваемое СУБД ограничение на исполнение команды, подлежащей преобразованию в синтаксически и семантически верную команду. После этого на этапе 130 идентифицируется, по меньшей мере, одна команда, подлежащая преобразованию в синтаксически верную команду. Затем на этапе 140 происходит назначение, по меньшей мере, основного семантического правила для идентифицированной на этапе 130 команды, подлежащей преобразованию в синтаксически верную команду, причем основное семантическое правило включает, по меньшей мере, одно рСП. На этапе 150 формируется РДС для идентифицированной команды, подлежащей преобразованию в синтаксически верную команду. Затем на этапе 160 происходит идентификация элементов назначенного на этапе 140 основного семантического правила для идентифицированной команды, подлежащей преобразованию в синтаксически верную команду, содержащихся в РДС, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически верную команду. На этапе 170 осуществляется применение всех элементов всех рСП, содержащихся в упомянутом, по меньшей мере, одном основном семантическом правиле, содержащемся в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду. В завершение на этапе 180 осуществляется генерирование синтаксически и семантически верной команды на основе примененных к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду, всех элементов всех рСП, из упомянутого, по меньшей мере, одного основного семантического правила, содержащегося в РДС, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду. При этом до начала выполнения этапа ПО может быть выполнен этап формирования реляционного описания синтаксиса команды, подлежащей преобразованию в синтаксически и семантически верную команду. В рамках выполнения этапа последовательно осуществляется, в частности, идентификация мета- описания синтаксиса команды; идентификация элементов мета-описания синтаксиса команды; присвоение каждому из упомянутых элементов уникального идентификатора (ГО), причем ID присваивается в порядке очередности расположения упомянутых элементов в мета-описании синтаксиса команды; формирования таблицы, содержащей все упомянутые элементы, причем каждый из упомянутых элементов содержится в одной колонке таблицы на разных строках таблицы; идентификации открывающих структурных элементов и закрывающих структурных элементов среди упомянутых элементов, содержащихся в таблице; генерирования двунаправленных связей между соответствующими открывающими структурными элементами и закрывающими структурными элементами; генерирования однонаправленных иерархических связей между упомянутыми открывающими элементами и соответствующим открывающим элементом, находящимся на предыдущем уровне вложенности, причем генерирование однонаправленных иерархических связей осуществляется для каждого открывающего элемента, находящегося на любом из уровней вложенности, кроме первого уровня вложенности. Дополнительно на этом этапе может быть так же осуществлен этап, на котором осуществляется генерирование однонаправленных списков наборов элементов мета-описания синтаксиса команды, находящихся на одном уровне вложенности, при этом однонаправленные списки наборов элементов мета-описания синтаксиса команды ограничены структурными элементами, при этом наборы элементов мета-описания синтаксиса команды расположены до или после разделительных элементов, причем генерирование однонаправленных списков наборов элементов мета-описания синтаксиса команды осуществляется для каждого уровня вложенности. In FIG. 1 shows an exemplary embodiment of a method for generating syntactically and semantically correct instructions. As an example, but not limitation, a method 100 for generating a syntactically and semantically correct command by processing the original CREATE TABLE command, which is an Oracle DBMS control command, is described. At the software stage, the conversion of at least one a Backus-Naura text form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, into at least one Backus-Naura relational form containing a meta recognized by the database management system (DBMS) - A description of the command to be converted to a syntactically and semantically correct command. At step 120, the conversion of at least one text-based semantic rule containing at least one restriction on the execution of a command to be converted into a syntactically and semantically correct command into at least one relational semantic rule containing at least one DBMS recognized restriction on the execution of a command to be converted into a syntactically and semantically correct command. After that, at step 130, at least one command to be converted to a syntactically correct command is identified. Then, at step 140, at least a basic semantic rule is assigned to the instruction identified in step 130 and is to be converted into a syntactically correct command, the basic semantic rule including at least one CPN. At step 150, an RDS is generated for the identified instruction to be converted to a syntactically correct instruction. Then, at step 160, the elements of the basic semantic rule assigned at step 140 for the identified instruction to be converted to the syntactically correct instruction contained in the RDS generated for the identified instruction to be converted to the syntactically correct instruction are identified. At step 170, all elements of all the CSPs contained in the at least one basic semantic rule contained in the resulting dynamic structure generated for the identified team to be converted to are applied. syntactically and semantically correct command, to the identified command to be converted into syntactically and semantically correct command. Finally, at step 180, a syntactically and semantically correct instruction is generated on the basis of all elements of all CPNs applied to the identified instruction to be converted into a syntactically and semantically correct instruction from the at least one basic semantic rule contained in the RDS generated for an identified command to be converted to a syntactically and semantically correct command. In this case, before the start of the software stage, the stage of generating a relational description of the command syntax to be converted into a syntactically and semantically correct command can be performed. As part of the execution of the step, in particular, the meta-description of the command syntax is identified; identification of elements of the meta description of command syntax; assigning to each of the mentioned elements a unique identifier (GO), the ID being assigned in the order of the location of the said elements in the meta-description of the command syntax; forming a table containing all of the mentioned elements, each of the mentioned elements is contained in one column of the table on different rows of the table; identification of opening structural elements and closing structural elements among the mentioned elements contained in the table; generating bidirectional links between the corresponding opening structural elements and the closing structural elements; generating unidirectional hierarchical relationships between the said opening elements and the corresponding opening element located at the previous nesting level, moreover, the generation of unidirectional hierarchical relations is carried out for each opening element located at any of the nesting levels, except for the first nesting level. Additionally on this a stage can also be carried out the stage at which the generation of unidirectional lists of sets of meta-description elements of the command syntax metadata is located at the same nesting level, while unidirectional lists of sets of meta-description elements of the command syntax are limited to structural elements, while the sets of meta-description elements command syntax are located before or after the separator elements, and the generation of unidirectional lists of sets of elements of the meta description of the command syntax is carried out Appears for each level of nesting.
На фиг. 2 в качестве примера, но не ограничения, изображено примерное осуществление устройства по настоящему изобретению, а именно устройство 200 для генерирования синтаксически и семантически верных команд, которое может представлять собой, но не ограничиваться: персональный компьютер, портативный компьютер, планшетный компьютер, карманный компьютер, смартфон, тонкий клиент и тому подобное. Устройство выполнено с возможностью доступа в сеть передачи данных и обязательно содержит один или более процессоров 210, машиночитаемый носитель данных (память) 220, модули ввода/вывода (I/O) 230 и порты ввода/вывода (I/O) 240. В памяти 220 хранится примерная среда 250, в которой при помощи компьютерных команд или кодов, хранящихся в памяти 220 устройства, может быть осуществлена процедура генерирования синтаксически и семантически верной команды. Память 220 устройства может представлять собой, не ограничиваясь: постоянное запоминающее устройство (ROM), электрически-стираемое программируемое постоянное запоминающее устройство (EEPROM), флэш-память, CDROM, цифровой универсальный диск (DVD) или другие оптические или голографические носители данных; магнитные кассеты, магнитную пленку, запоминающее устройство на магнитных дисках или другие магнитные запоминающие устройства, несущие волны или другой носитель данных, который может быть использован для хранения требуемой информации. Устройство так же содержит один или более процессоров 210, которые предназначены для выполнения компьютерных команд или кодов, хранящихся в памяти устройства с целью обеспечения выполнения процедуры генерирования синтаксически и семантически верной команды. Компьютерные команды, выполняемые устройством, представляют собой команды, реализующие этапы, описанные в данном разделе заявки. В одном из вариантов осуществления настоящего изобретения, устройство 200 представляет собой в качестве примера, а не ограничения, персональный компьютер пользователя. Данный персональный компьютер имеет операционную среду 250, которая в качестве примера, а не ограничения представляет собой операционную систему семейства Windows или MacOS, или Unix. Кроме того, устройство содержит память, выполненную в одном из перечисленных вариантов осуществления, в которой хранится компьютерное приложение, представляющее собой соответствующий набор компьютерных команд или кодов, которыми может манипулировать пользователь. Процедура генерирования синтаксически и семантически верной команды осуществляется посредством этого приложения путем выбора команды, подлежащей преобразованию в синтаксически и семантически верную команду. В качестве примера, но не ограничения, такой командой может быть команда управления СУБД Oracle. В данном примерном варианте осуществления изобретения пользователь сам выбирает команду, подлежащую преобразованию в синтаксически и семантически верную команду, после чего следует подсказкам приложения, с помощью которого осуществляется генерирование синтаксически и семантически верной команды. Пользователь так же имеет возможность создать шаблон генерирования синтаксически и семантически верной команды (сценарий генерирования), либо он может быть сгенерирован автоматически с помощью компьютерного приложения или блока генерирования сценария генерирования синтаксически и семантически верной команды по заданным параметрам. В случае если устройство 200 является тонким клиентом, в упомянутой памяти 220 не осуществляется сохранение компьютерных команд и кодов программы, а все вьршсления осуществляются на сервере, с которым способно связываться посредством сети передачи данных или иными способами проводной и беспроводной связи устройство 200, представленное в виде тонкого клиента. In FIG. 2, by way of example, but not limitation, an exemplary embodiment of the apparatus of the present invention is shown, namely, apparatus 200 for generating syntactically and semantically correct instructions, which may include, but is not limited to: a personal computer, a laptop computer, a tablet computer, a palmtop computer, smartphone, thin client and the like. The device is configured to access a data network and necessarily contains one or more processors 210, a computer-readable storage medium (memory) 220, input / output (I / O) modules 230 and input / output (I / O) ports 240. In memory 220, an example environment 250 is stored in which, using computer instructions or codes stored in the device memory 220, a procedure can be generated to generate syntactically and semantically correct instructions. Device memory 220 may be, but is not limited to: read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory, CDROM, digital versatile disk (DVD) or other optical or holographic storage media; magnetic cassettes, magnetic tape, magnetic disk storage device or other magnetic storage devices, wave carriers or other storage medium that can be used to store the required information. The device is also contains one or more processors 210 that are designed to execute computer instructions or codes stored in the device memory in order to ensure that the procedure for generating syntactically and semantically correct instructions is executed. The computer commands executed by the device are commands that implement the steps described in this section of the application. In one of the embodiments of the present invention, the device 200 is an example, and not limitation, of the user's personal computer. This personal computer has an operating environment of 250, which as an example, and not limitation, is an operating system of the Windows or MacOS, or Unix family. In addition, the device comprises a memory made in one of the above embodiments, in which a computer application is stored, which is a corresponding set of computer instructions or codes that the user can manipulate. The procedure for generating a syntactically and semantically correct command is carried out through this application by selecting the command to be converted into a syntactically and semantically correct command. As an example, but not limitation, such a command can be an Oracle DBMS management command. In this exemplary embodiment of the invention, the user himself selects the command to be converted into a syntactically and semantically correct command, and then follows the prompts of the application by which the syntactically and semantically correct command is generated. The user also has the opportunity to create a template for generating a syntactically and semantically correct command (a generation script), or it can be automatically generated using a computer application or a block generating a script for generating a syntactically and semantically correct command according to the specified parameters. If device 200 is a thin client, in the aforementioned memory 220 does not store computer commands and program codes, and all the tasks are carried out on a server with which the device 200, which is presented as a thin client, is capable of communicating via a data network or other means of wired and wireless communication.
На фиг. 3 представлено примерное исполнение системы 300 для генерирования синтаксически и семантически верных команд, которая содержит устройство 200 для генерирования синтаксически и семантически верных команд, сеть передачи данных 310, один или несколько серверов 320 и базу данных или машину баз данных 330. Сеть 310 может включать в себя, но не ограничиваться, одну или более локальных сетей (LAN) и/или глобальных сетей (WAN), или может представлять собой информационно- телекоммуникационную сеть Интернет, или Интранет, или виртуальную частную сеть (VPN) и тому подобное. Система 300 включает в себя упомянутое устройство 200 для генерирования синтаксически и семантически верных команд. Устройство 200 для генерирования синтаксически и семантически верных команд, как было указано выше, применяется для выполнения процедуры генерирования синтаксически и семантически верных команд. В примерном варианте осуществления, устройство 200 для генерирования синтаксически и семантически верных команд представляет собой устройство 200 для генерирования синтаксически и семантически верных команд, которое было описано ранее со ссылкой на фиг. 2. Дополнительно система 300 включает в себя сервер 320, который может представлять собой: персональный компьютер, портативный компьютер, планшетный компьютер, карманный компьютер, смартфон, машину баз данных и тому подобное. Сервер 320 обеспечивает регулирование обменом данных в системе 300, а также обеспечивает обработку данных при условии подключения к нему одного или более чем одного устройства 200 для генерирования синтаксически и семантически верных команд или когда устройство 200 для генерирования синтаксически и семантически верных команд представляет собой тонкий клиент, при этом все вычислительные мощности, необходимые для обеспечения выполнения процедуры генерирования синтаксически и семантически верных команд, расположены на сервере 320. Сервер 320 также имеет возможность обеспечивать виртуальную вычислительную среду (Virtual Machine) для обеспечения взаимодействия между устройством 200 для генерирования синтаксически и семантически верных команд и базой данных (машиной баз данных) 330 (БД). БД 330 может представлять собой, не ограничиваясь: иерархическую БД, сетевую БД, реляционную БД, объектную БД, объектно- ориентированную БД, объектно-реляционную БД, пространственную БД, комбинацию перечисленных двух и более БД, и тому подобное. БД 330 хранит данные в памяти, к которой может быть осуществлен доступ посредством устройства 200 для генерирования синтаксически и семантически верных команд и сервера 320. Память может представлять собой, в частности, память, как это было описано ранее. БД 330 служит для хранения данных, представляющих собой: команды для осуществления процедуры генерирования синтаксически и семантически верных команд, документации СУБД, текстовых БНФ, получаемых рБНФ, текстовых СП, получаемых рСП и других данных, необходимых для функционирования системы. In FIG. 3 illustrates an exemplary embodiment of a system 300 for generating syntactically and semantically correct instructions, which comprises an apparatus 200 for generating syntactically and semantically correct instructions, a data network 310, one or more servers 320, and a database or database engine 330. Network 310 may include yourself, but not limited to, one or more local area networks (LAN) and / or wide area networks (WAN), or it can be an information and telecommunication network Internet, or an Intranet, or a virtual private network (VPN), etc. approved. System 300 includes said apparatus 200 for generating syntactically and semantically correct instructions. An apparatus 200 for generating syntactically and semantically correct instructions, as indicated above, is used to perform a procedure for generating syntactically and semantically correct instructions. In an exemplary embodiment, the apparatus 200 for generating syntactically and semantically correct instructions is the apparatus 200 for generating syntactically and semantically correct instructions, which has been described previously with reference to FIG. 2. Additionally, the system 300 includes a server 320, which may be: a personal computer, a laptop computer, a tablet computer, a PDA, a smartphone, a database machine, and the like. Server 320 provides data exchange control in system 300 and also provides data processing provided that one or more devices 200 for generating syntactically and semantically correct instructions are connected to it or when device 200 for generating syntactically and semantically correct instructions is a thin client, while all the computing power necessary to ensure the generation of syntactically and semantically correct instructions is located on server 320. Server 320 also has the ability to provide a virtual computing environment (Virtual Machine) to allow interaction between device 200 for generating syntactically and semantically correct commands and a database (database engine) 330 (DB). A database 330 may be, but is not limited to: a hierarchical database, a network database, a relational database, an object database, an object-oriented database, an object-relational database, a spatial database, a combination of these two or more databases, and the like. The database 330 stores data in memory, which can be accessed through the device 200 to generate syntactically and semantically correct instructions and the server 320. The memory may be, in particular, memory, as described previously. DB 330 is used for storing data, which is: instructions for the implementation of the procedure for generating syntactically and semantically correct instructions, DBMS documentation, text BNFs received by RBNFs, text SPs received by RSPs and other data necessary for the functioning of the system.
Настоящее описание изобретения демонстрирует лишь частный вариант осуществления и не ограничивает иные варианты реализации изобретения, поскольку возможные альтернативные варианты осуществления изобретения, не выходящие за пределы объема информации, изложенной в настоящей заявке, должны быть очевидными для специалиста в данной области техники, имеющим обычную квалификацию, на которого рассчитано заявленное изобретение.  The present description of the invention demonstrates only a particular embodiment and does not limit other embodiments of the invention, since possible alternative embodiments of the invention, not beyond the scope of the information set forth in this application, should be obvious to a person skilled in the art having the usual qualification, which is calculated the claimed invention.

Claims

Формула изобретения Claim
1. Способ генерирования синтаксически и семантически верных команд, заключающийся в: 1. A method of generating syntactically and semantically correct commands, which consists in:
a) преобразовании, по меньшей мере, одной текстовой формы Бэкуса- Наура, содержащей мета-описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое системой управления базой данных (СУБД) мета-описание команды, подлежащей преобразованию в синтаксически и семантически верную команду;  a) converting at least one Backus-Naur text form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, into at least one Backus-Naur relational form containing recognized by the database management system (DBMS) meta-description of the command to be converted into a syntactically and semantically correct command;
b) преобразовании, по меньшей мере, одного текстового семантического правила, содержащего, по меньшей мере, одно ограничение на исполнение команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одно реляционное семантическое правило, содержащее, по меньшей мере, одно распознаваемое СУБД ограничение на исполнение команды, подлежащей преобразованию в синтаксически и семантически верную команду;  b) converting at least one text-based semantic rule containing at least one restriction on the execution of a command to be converted into a syntactically and semantically correct command into at least one relational semantic rule containing at least , one recognized DBMS restriction on the execution of a command to be converted into a syntactically and semantically correct command;
c) идентификации, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду;  c) identifying at least one instruction to be converted to a syntactically and semantically correct instruction;
d) назначении, по меньшей мере, основного семантического правила для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, причем основное семантическое правило включает, по меньшей мере, одно реляционное семантическое правило;  d) designating at least a basic semantic rule for an identified instruction to be converted into a syntactically and semantically correct instruction, the basic semantic rule including at least one relational semantic rule;
e) формировании результирующей динамической структуры для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду;  e) generating a resulting dynamic structure for the identified instruction to be converted to a syntactically and semantically correct instruction;
f) идентификации элементов упомянутого основного семантического правила для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, содержащихся в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду; f) identifying the elements of said basic semantic rule for the identified instruction to be converted to syntactically and semantically correct command contained in the resulting dynamic structure generated for the identified command to be converted into syntactically and semantically correct command;
g) применении всех элементов всех реляционных семантических правил, содержащихся в упомянутом, по меньшей мере, одном основном семантическом правиле, содержащемся в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду.  g) applying all the elements of all relational semantic rules contained in the said at least one basic semantic rule contained in the resulting dynamic structure formed for the identified team to be converted to a syntactically and semantically correct team to the identified team to be converted to syntactically and semantically correct command.
h) генерировании синтаксически и семантически верной команды на основе примененных к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду, всех элементов всех реляционных семантических правил, из упомянутого, по меньшей мере, одного основного семантического правила, содержащегося в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду.  h) generating a syntactically and semantically correct command based on all elements of all relational semantic rules applied to the identified command to be converted into a syntactically and semantically correct command from the at least one basic semantic rule contained in the resulting dynamic structure generated for an identified command to be converted to a syntactically and semantically correct command.
2. Способ по п. 1, отличающийся тем, что предварительно осуществляют формирование реляционного описания синтаксиса команды, подлежащей преобразованию в синтаксически и семантически верную команду.  2. The method according to p. 1, characterized in that they preliminarily form a relational description of the syntax of the command to be converted into a syntactically and semantically correct command.
3. Способ по п. 2, отличающийся тем, что формирование реляционного описания синтаксиса команды, подлежащей преобразованию в синтаксически и семантически верную команду осуществляют посредством выполнения этапов, на которых:  3. The method according to p. 2, characterized in that the formation of a relational description of the syntax of the command to be converted into a syntactically and semantically correct command is carried out by performing the steps in which:
идентифицируют мета-описание синтаксиса команды;  identify a meta description of command syntax;
идентифицируют элементы мета-описания синтаксиса команды и присваивают каждому из упомянутых элементов уникальный идентификатор (ID), причем Ш присваивают в порядке очередности расположения упомянутых элементов в мета-описании синтаксиса команды; identify the elements of the meta-description of the command syntax and assign each of the mentioned elements a unique identifier (ID), wherein W is assigned in order of location of said elements in the meta description of the command syntax;
формируют таблицу, содержащую все упомянутые элементы, причем каждый из упомянутых элементов содержится в одной колонке таблицы на разных строках таблицы;  form a table containing all of the mentioned elements, and each of these elements is contained in one column of the table on different rows of the table;
идентифицируют открывающие структурные элементы и закрывающие структурные элементы среди упомянутых элементов, содержащихся в таблице, и генерируют двунаправленные связи между соответствующими открывающими структурными элементами и закрывающими структурными элементами;  identifying opening structural elements and closing structural elements among said elements contained in the table, and generating bi-directional connections between respective opening structural elements and closing structural elements;
генерируют однонаправленные иерархические связи между упомянутыми открывающими элементами и соответствующим открывающим элементом, находящимся на предыдущем уровне вложенности, причем генерирование однонаправленных иерархических связей осуществляют для каждого открывающего элемента, находящегося на любом из уровней вложенности, кроме первого уровня вложенности.  unidirectional hierarchical relations are generated between the said opening elements and the corresponding opening element located at the previous nesting level, and unidirectional hierarchical relations are generated for each opening element located at any of the nesting levels, except for the first nesting level.
4. Способ по п. 3, отличающийся тем, что мета-описание синтаксиса команды содержит, по меньшей мере, совокупность терминальных элементов, нетерминальных элементов и вспомогательных элементов.  4. The method according to p. 3, characterized in that the meta-description of the command syntax contains at least a combination of terminal elements, non-terminal elements and auxiliary elements.
5. Способ по п. 4, отличающийся тем, что вспомогательные элементы представляют собой совокупность открывающих структурных элементов, закрывающих структурных элементов и разделительных элементов.  5. The method according to p. 4, characterized in that the auxiliary elements are a combination of opening structural elements, closing structural elements and dividing elements.
6. Способ по п. 5, отличающийся тем, что вспомогательные элементы дополнительно представляют собой признаки повторяемости.  6. The method according to p. 5, characterized in that the auxiliary elements additionally represent signs of repeatability.
7. Способ по п. 6, отличающийся тем, что на этапе идентификации открывающих структурных элементов и закрывающих структурных элементов дополнительно идентифицируются признаки повторяемости.  7. The method according to p. 6, characterized in that at the stage of identification of the opening structural elements and closing structural elements are additionally identified signs of repeatability.
8. Способ по п. 7, отличающийся тем, что дополнительно содержит этап, на котором элементу мета-описания синтаксиса команды, ID которого близок к Ш признака повторяемости, присваивают дополнительный параметр, отличный от признака повторяемости, при этом признак повторяемости удаляется из таблицы. 8. The method according to claim 7, characterized in that it further comprises the step of assigning an additional metadata element to the syntax of the command whose ID is close to W of the repeatability attribute a parameter that is different from the sign of repeatability, while the sign of repeatability is removed from the table.
9. Способ по п. 8, отличающийся тем, что дополнительно содержит этап, на котором осуществляется генерирование однонаправленных списков наборов элементов мета-описания синтаксиса команды, находящихся на одном уровне вложенности, при этом однонаправленные списки наборов элементов мета-описания синтаксиса команды ограничены структурными элементами, при этом наборы элементов мета-описания синтаксиса команды расположены до или после разделительных элементов, причем генерирование однонаправленных списков наборов элементов мета-описания синтаксиса команды осуществляется для каждого уровня вложенности.  9. The method according to p. 8, characterized in that it further comprises the step of generating unidirectional lists of sets of meta-description elements of the command syntax that are at the same nesting level, while unidirectional lists of sets of meta-description elements of the command syntax are limited to structural elements wherein the sets of meta-description elements of the command syntax are located before or after the separating elements, and the generation of unidirectional lists of sets of meta-description elements with command intaxis is implemented for each nesting level.
10. Способ по п. 9, отличающийся тем, что реляционная форма Бэкуса- Наура, основное семантическое правило, реляционное семантическое правило, результирующая динамическая структура представляют собой таблицы содержащие, по меньшей мере, записи, записанные в отдельные ячейки таблиц, имеющие номер строки и идентификатор столбца, при этом реляционная форма Бэкуса-Наура и реляционное семантическое правило имеют собственные уникальные ключи, которые могут быть ассоциированы между собой.  10. The method according to p. 9, characterized in that the Backus-Naur relational form, the basic semantic rule, the relational semantic rule, the resulting dynamic structure are tables containing at least records recorded in separate table cells having a row number and the column identifier, while the Backus-Naur relational form and the relational semantic rule have their own unique keys that can be associated with each other.
11. Способ по п. 10, отличающийся тем, что реляционная форма Бэкуса-Наура содержит, по меньшей мере, одно из структурные элементы, терминальные элементы, нетерминальные элементы, признак повторяемости или их комбинацию.  11. The method according to p. 10, characterized in that the relational form of Backus-Naur contains at least one of the structural elements, terminal elements, nonterminal elements, a sign of repeatability, or a combination thereof.
12. Способ по п. 11, отличающийся тем, что структурные элементы представляют собой, по меньшей мере, одно из открывающая скобка, закрывающая скобка, открывающая фигурная скобка, закрывающая фигурная скобка, вертикальная черта, или их комбинацию; терминальные элементы представляют собой, по меньшей мере, ключевые слова, записанные полужирным шрифтом в верхнем регистре; нетерминальные элементы представляют собой, по меньшей мере, ключевые слова, записанные в нижнем регистре; признак повторяемости представляет собой, по меньшей мере, эллипсис, при этом элементы, ограниченные открывающей скобкой слева и закрывающей скобкой справа являются необязательными структурными элементами, элементы, после которых расположен признак повторяемости, являются повторяющимися элементами, элементы, разделенные вертикальной чертой являются альтернативными элементами. 12. The method according to p. 11, characterized in that the structural elements are at least one of an opening bracket, a closing bracket, an opening curly bracket, a closing curly bracket, a vertical bar, or a combination thereof; terminal elements are at least keywords in bold upper case; nonterminal elements are at least keywords recorded in lower case the repeatability sign is at least an ellipsis, while the elements bounded by the opening bracket on the left and the closing bracket on the right are optional structural elements, the elements after which the repeatability sign is located are repeating elements, elements separated by a vertical bar are alternative elements.
13. Способ по п. 12 отличающийся тем, что при преобразовании, по меньшей мере, одной текстовой формы Бэкуса-Наура, содержащей мета- описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое СУБД мета-описание команды, подлежащей преобразованию в синтаксически и семантически верную команду, необязательные структурные элементы могут быть удалены.  13. The method according to p. 12 characterized in that when converting at least one text backus-Naur form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, at least at least one Backus-Naur relational form containing a recognized DBMS meta-description of a command to be converted to a syntactically and semantically correct command, optional structural elements can be deleted.
14. Способ по п. 12 отличающийся тем, что при преобразовании, по меньшей мере, одной текстовой формы Бэкуса-Наура, содержащей мета- описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое СУБД мета- описание команды, подлежащей преобразованию в синтаксически и семантически верную команду, повторяющиеся элементы могут быть дублированы.  14. The method according to p. 12 characterized in that when converting at least one text backus-Naur form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, at least at least one Backus-Naur relational form containing a recognizable DBMS meta-description of a command to be converted to a syntactically and semantically correct command, repeated elements can be duplicated.
15. Способ по п. 12, отличающийся тем, что при преобразовании, по меньшей мере, одной текстовой формы Бэкуса-Наура, содержащей мета- описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое СУБД мета-описание команды, подлежащей преобразованию в синтаксически и семантически верную команду, терминальные элементы и/или нетерминальные элементы могут быть выбраны для включения в реляционную форму Бэкуса-Наура. 15. The method according to p. 12, characterized in that when converting at least one text backus-Naur form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, in at least one Backus-Naur relational form containing a recognizable DBMS meta-description of a command to be converted to a syntactically and semantically correct command, terminal elements and / or nonterminal elements can be selected for inclusion in the Backus-Naur relational form.
16. Способ по п. 15, отличающийся тем, что при преобразовании, по меньшей мере, одной текстовой формы Бэкуса-Наура, содержащей мета- описание, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, в, по меньшей мере, одну реляционную форму Бэкуса-Наура, содержащую распознаваемое СУБД мета-описание команды, подлежащей преобразованию в синтаксически и семантически верную команду, все альтернативные терминальные элементы и/или нетерминальные элементы могут быть выбраны для включения в реляционную форму Бэкуса-Наура.  16. The method according to p. 15, characterized in that when converting at least one text backus-Naur form containing a meta-description of at least one command to be converted into a syntactically and semantically correct command, in at least one Backus-Naur relational form containing a recognizable DBMS meta-description of the command to be converted to a syntactically and semantically correct command, all alternative terminal elements and / or non-terminal elements can be selected for inclusion in the relational the new form of Backus-Naur.
17. Способ по любому из п.п. 1-16, отличающийся тем, что реляционная форма Бэкуса-Наура имеет, по меньшей мере, атрибут имя реляционной Формы Бэкуса-Наура, атрибут тело формы Бэкуса-Наура, атрибут уникальный ключ.  17. The method according to any one of paragraphs. 1-16, characterized in that the relational Backus-Naur form has at least the attribute name of the relational Backus-Naur Form, the body attribute of the Backus-Naur form, the unique key attribute.
18. Способ по п. 17, отличающийся тем, что атрибут уникальный ключ представляет собой комбинацию номера элемента реляционной формы Бэкуса-Наура, имени преобразовываемой текстовой формы Бэкуса-Наура и записи в одной из ячеек упомянутой реляционной формы Бэкуса-Наура.  18. The method according to p. 17, characterized in that the unique key attribute is a combination of the number of the element of the Backus-Naur relational form, the name of the converted text backus-Naur form, and the entry in one of the cells of the mentioned backus-Naur relational form.
19. Способ по п. 18, отличающийся тем, что номер строки реляционной формы Бэкуса-Наура, имя преобразовываемой текстовой формы Бэкуса- Наура и запись в одной из ячеек упомянутой реляционной формы Бэкуса- Наура расположены в разных столбцах на одной строке таблицы.  19. The method according to p. 18, characterized in that the row number of the Backus-Naur relational form, the name of the converted Backus-Naur text form and the entry in one of the cells of the mentioned Backus-Naur relational form are located in different columns on the same row of the table.
20. Способ по п. 19, отличающийся тем, что основное семантическое правило представляет собой совокупность реляционных семантических правил.  20. The method according to p. 19, characterized in that the basic semantic rule is a collection of relational semantic rules.
21. Способ по п. 20, отличающийся тем, что реляционное семантическое правило имеет, по меньшей мере, атрибут имя, атрибут тело, атрибут уникальный ключ.  21. The method according to p. 20, characterized in that the relational semantic rule has at least the attribute name, attribute body, attribute unique key.
22. Способ по п. 21, отличающийся тем, записи таблицы представляют собой, комбинацию записей, по меньшей мере, из номера элемента реляционного семантического правила, уникального идентификатора правила, номера элемента реляционной формы Бэкуса-Наура, имени реляционного семантического правила, такого же как имя реляционной формы Бэкуса-Наура, к которой реляционное семантическое правило применяется, указания на терминальный элемент или нетерминальный элемент, к которому применяется правило, указания на возможные операции над упомянутыми терминальным элементом или нетерминальным элементом, значения, присвоенного упомянутым терминальному элементу или нетерминальному элементу, логической функцией для операций над упомянутыми терминальным элементом или нетерминальным элементом, комментария, фрагмента документации, указания на команду, подлежащую преобразованию в синтаксически и семантически верную команду, статуса правила, признака активности правила. 22. The method according to p. 21, characterized in that the table entries represent a combination of entries from at least the element number of the relational semantic rule, the unique identifier of the rule, the element number of the Backus-Naura relational form, the name of the relational semantic rule, the same as the name of the Backus-Naura relational form to which the relational semantic rule is applied, indications of a terminal element or non-terminal element to which the rule applies, indications of possible operations on said terminal element or non-terminal element, values, Assignment to said terminal element or nonterminal element, a logical function for operations on the said terminal element or a non-terminal element, comment, track documents, indications of a team, to be transformed into a syntactically and semantically correct command, rule status, tag rules activity.
23. Способ по п. 22, отличающийся тем, что атрибут уникальный ключ представляет собой комбинацию номера элемента реляционного семантического правила, имени реляционной формы Бэкуса-Наура, к которой реляционное семантическое правило применяется, и записи в одной из ячеек упомянутого реляционного семантического правила.  23. The method according to p. 22, characterized in that the unique key attribute is a combination of the element number of the relational semantic rule, the name of the Backus-Naur relational form to which the relational semantic rule is applied, and entries in one of the cells of the mentioned relational semantic rule.
24. Способ по п. 23, отличающийся тем, что номер строки реляционного семантического правила, имя реляционной формы Бэкуса- Наура, к которой реляционное семантическое правило применяется, и запись в одной из ячеек упомянутого реляционного семантического правила расположены в разных столбцах на одной строке упомянутого реляционного семантического правила.  24. The method according to claim 23, wherein the line number of the relational semantic rule, the name of the Backus-Naur relational form to which the relational semantic rule is applied, and the entry in one of the cells of the said relational semantic rule are located in different columns on the same line of the said relational semantic rule.
25. Способ по любому из п. п. 1-16, 18-24, отличающийся тем, что результирующая динамическая структура формируется путем операции соединения реляционной формы Бэкуса-Наура и реляционного семантического правила, элементы которого ассоциированы с элементами реляционной формы Бэкуса-Наура. 25. The method according to any one of p. 1-16, 18-24, characterized in that the resulting dynamic structure is formed by the operation of connecting the relational form of Backus-Naur and the relational semantic rule, the elements of which are associated with elements of the relational form of Backus-Naur.
26. Способ по п. 25, отличающийся тем, что результирующая динамическая структура содержит комбинацию записей, по меньшей мере из номера элемента в реляционной форме Бэкуса-Наура, имени реляционной формы Бэкуса-Наура, записи в одной из ячеек реляционной формы Бэкуса- Наура, признака отображения элемента, признака выбора элемента, признака пропуска элемента, при котором элемент удаляется, типа операции над элементом, значения, заданного для элемента, значения присвоенного элементу, указания на логическую функцию для операции. 26. The method according to p. 25, characterized in that the resulting dynamic structure contains a combination of records from at least the element number in the Backus-Naur relational form, the name of the Backus-Naur relational form, the records in one of the cells of the Backus-Naur relational form, a flag for displaying an element, a flag for selecting an element, a flag for skipping an element at which the element is deleted, such as the operation on the element, the value specified for the element, the value assigned to the element, an indication of a logical function for the operation.
27. Способ по п. 26, отличающийся тем, что при формировании результирующей динамической структуры проверяется совпадение уникальных ключей реляционной формы БНФ и реляционного семантического правила, и при совпадении упомянутых уникальных ключей, соответствующий элемент реляционного семантического правила применяется к соответствующему элементу реляционной формы Бэкуса- Наура.  27. The method according to p. 26, characterized in that when generating the resulting dynamic structure, the coincidence of the unique keys of the relational form of the BNF and the relational semantic rule is checked, and if the unique keys coincide, the corresponding element of the relational semantic rule is applied to the corresponding element of the relational form of Backus-Naur .
28. Способ по любому из п.п. 1-16, 18-24, 26, 27, отличающийся тем, что команда, подлежащая преобразованию в синтаксически и семантически верную команду, является SQL командой.  28. The method according to any one of paragraphs. 1-16, 18-24, 26, 27, characterized in that the command to be converted to a syntactically and semantically correct command is an SQL command.
29. Способ по п. 28, отличающийся тем, что при идентификации, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, идентифицируются все реляционные семантические правила, ассоциированные с командой, подлежащей преобразованию в синтаксически и семантически верную команду, при этом те реляционные семантические правила, которые ссылаются на упомянутую команду, могут быть отличены от реляционных семантических правил, которые не ссылаются на упомянутую команду.  29. The method according to p. 28, characterized in that when identifying at least one team to be converted to a syntactically and semantically correct command, all relational semantic rules associated with the team to be converted to a syntactically and semantically correct team are identified, however, those relational semantic rules that refer to the said command can be distinguished from relational semantic rules that do not refer to the mentioned command.
30. Способ по п. 29, отличающийся тем, что при генерировании синтаксически и семантически верной команды на основе примененных к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду, всех элементов всех реляционных семантических правил, из упомянутого, по меньшей мере, одного основного семантического правила, содержащегося в результирующей динамической структуре, сформированной для идентифицированной упомянутой команды, проверяется применение всех элементов всех реляционных семантических правил, содержащихся в упомянутом, по меньшей мере, одном основном семантическом правиле, содержащемся в результирующей динамической структуре, сформированной для идентифицированной команды, подлежащей преобразованию в синтаксически и семантически верную команду, при этом осуществляется демонстрация упомянутых всех элементов упомянутых всех реляционных семантических правил с указанием на выполнение каждого из элементов каждого из реляционных семантических правил. 30. The method according to p. 29, characterized in that when generating a syntactically and semantically correct command based on applied to the identified command to be converted into a syntactically and semantically correct command, all elements of all relational semantic rules, from the at least one basic semantic rule contained in the resulting dynamic structure generated for the identified mentioned command, the application of all elements of all relational semantic rules contained in the said at least one basic semantic rule is checked in the resulting dynamic structure formed for the identified team to be converted to syntactically and semantically correct A team at the same time providing a demonstration of all the elements mentioned mentioned all relational semantic rules with an indication of the performance of each of the elements of each of the relational semantic rules.
31. Способ по п. 30, отличающийся тем, что при генерировании синтаксически и семантически верной команды на основе примененных к идентифицированной команде, подлежащей преобразованию в синтаксически и семантически верную команду, всех элементов всех реляционных семантических правил, из упомянутого, по меньшей мере, одного основного семантического правила, содержащегося в результирующей динамической структуре, сформированной для идентифицированной упомянутой команды, осуществляется демонстрация упомянутой команды, при этом такая демонстрация содержит все включенные в команду терминальные элементы и нетерминальные элементы, причем, в случае, когда нетерминальному элементу присвоено значение, демонстрируется это значение, при этом упомянутые терминальные элементы и нетерминальные элементы могут быть применены к другим командам, подлежащим преобразованию в синтаксически и семантически верную команду.  31. The method according to p. 30, characterized in that when generating a syntactically and semantically correct command based on all elements of all relational semantic rules from the at least one applied to the identified command to be converted to a syntactically and semantically correct command the basic semantic rule contained in the resulting dynamic structure generated for the identified mentioned team, the demonstration of the mentioned command is carried out, while such a demon the section contains all the terminal elements and non-terminal elements included in the command, and when a value is assigned to the non-terminal element, this value is shown, while the mentioned terminal elements and non-terminal elements can be applied to other commands to be converted to a syntactically and semantically correct command .
32. Способ по п. 31, отличающийся тем, что при идентификации, по меньшей мере, одной команды, подлежащей преобразованию в синтаксически и семантически верную команду, демонстрируются фрагменты документации СУБД, относящиеся к упомянутой команде. 32. The method according to p. 31, characterized in that when identifying at least one command to be converted into a syntactically and semantically correct command, fragments of the DBMS documentation related to said command are shown.
33. Способ по любому из п.п. 1-16, 18-24, 26, 27, 29-32, отличающийся тем, что действие, совершенное по отношению к идентифицированной команде, подлежащей преобразованию в семантически и синтаксически верную команду может быть отменено, при этом процедура генерирования синтаксически и семантически верной команды продолжается со значений и условий, соответствующих значениям и условиям, которые были установлены до отмены упомянутого действия. 33. The method according to any one of paragraphs. 1-16, 18-24, 26, 27, 29-32, characterized in that the action taken in relation to the identified command to be converted into a semantically and syntactically correct command can be canceled, while the procedure for generating syntactically and semantically correct command continues with the values and conditions corresponding to the values and conditions that were established before the cancellation of the said action.
34. Устройство генерирования синтаксически и семантически верных команд, содержащее:  34. A device for generating syntactically and semantically correct instructions, comprising:
один или более процессоров;  one or more processors;
модули ввода/вывода (I/O);  input / output modules (I / O);
порты I/O; и  I / O ports and
память, содержащую код программы, который при выполнении побуждает процессор или процессоры упомянутого устройства и/или устройства, связанного с упомянутым устройством, выполнять действия способа по любому из п.п. 1-33 формулы.  a memory containing program code, which upon execution causes the processor or processors of said device and / or device associated with said device to perform method steps according to any one of paragraphs. 1-33 formulas.
35. Система генерирования синтаксически и семантически верных команд, содержащая, по меньшей мере:  35. A system for generating syntactically and semantically correct instructions, comprising at least:
множество устройств генерирования синтаксически и семантически верных команд, выполненных в виде устройств по п. 34 формулы;  many devices for generating syntactically and semantically correct instructions executed in the form of devices according to claim 34 of the formula;
один или несколько серверов, обеспечивающих регулирование обменом данных в системе;  one or more servers providing regulation of data exchange in the system;
одну базу данных, предназначенную для хранения данных, выполненную с возможностью взаимодействия с упомянутыми устройствами генерирования синтаксически и семантически верных команд и одним или несколькими серверами;  one database for storing data, configured to interact with the aforementioned devices for generating syntactically and semantically correct commands and one or more servers;
одну сеть передачи данных, через которую осуществляется взаимодействие упомянутых устройств генерирования синтаксически и семантически верных команд, одного или нескольких серверов и базы данных. one data transmission network through which the interaction of the said devices generating syntactically and semantically correct commands, one or more servers and a database is carried out.
36. Система по п. 35, отличающаяся тем, что генерирование синтаксически и семантически верных команд осуществляется одним или несколькими серверами, а упомянутые устройства генерирования синтаксически и семантически верных команд представляют собой тонкий клиент. 36. The system according to p. 35, characterized in that the generation of syntactically and semantically correct commands is carried out by one or more servers, and said devices for generating syntactically and semantically correct commands are a thin client.
37. Система по п. 36, отличающаяся тем, что база данных служит для хранения данных, представляющих собой, по меньшей мере одно из команды для осуществления процедуры генерирования синтаксически и семантически верных команд, документации СУБД, текстовые формы Бэкуса-Наура, получаемых реляционных форм Бэкуса-Наура, текстовых семантических правил, получаемых реляционных семантических правил.  37. The system of claim 36, wherein the database is used to store data representing at least one of a command for generating syntactically and semantically correct commands, DBMS documentation, Backus-Naur text forms, resulting relational forms Backus-Naura, textual semantic rules obtained by relational semantic rules.
38. Система по п. 37 отличающаяся тем, что при выполнении процедуры генерирования синтаксически и семантически верных команд упомянутые один или несколько серверов запрашивают команды для осуществления процедуры генерирования синтаксически и семантически верных команд перед началом генерирования синтаксически и семантически верных команд.  38. The system of claim 37, wherein, when performing the procedure for generating syntactically and semantically correct instructions, said one or more servers request commands for performing the procedure for generating syntactically and semantically correct instructions before starting to generate syntactically and semantically correct instructions.
39. Система по п. 38, отличающаяся тем, что упомянутые один или несколько серверов регулируют обмен данными с упомянутыми устройствами для выполнения процедуры генерирования синтаксически и семантически верной команды посредством виртуальной машины.  39. The system of claim 38, wherein said one or more servers regulate the exchange of data with said devices to perform a procedure for generating syntactically and semantically correct instructions through a virtual machine.
40. Система по любому из п.п. 35-39, отличающаяся тем, что упомянутая сеть передачи данных представляет собой одно из локальная сеть (LAN), глобальная сеть (WAN), информационно-телекоммуникационная сеть Интернет, сеть Интранет, виртуальная частная сеть (VPN).  40. System according to any one of paragraphs. 35-39, characterized in that said data network is one of a local area network (LAN), wide area network (WAN), information and telecommunication network Internet, intranet, virtual private network (VPN).
41. Система по п. 40, отличающаяся тем, что организация упомянутой базы данных представляет собой одно из иерархическая организация базы данных, сетевая организация базы данных, реляционная организация базы данных, объектная организация базы данных, объектно-ориентированная организация базы данных, объектно-реляционная организация базы данных, пространственная организация базы данных. 41. The system of claim 40, wherein the organization of said database is one of the hierarchical organization of the database, network organization of the database, relational organization of the database, object organization of the database, object-oriented database organization, object-relational database organization, spatial database organization.
42. Система по любому из п. 42, отличающаяся тем, что упомянутая база данных представляет собой машину баз данных.  42. The system according to any one of p. 42, characterized in that the said database is a database machine.
PCT/RU2014/000703 2013-09-23 2014-09-23 Method for generating syntactically and semantically correct commands WO2015041575A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
RU2013142876/08A RU2534823C1 (en) 2013-09-23 2013-09-23 Method of generating syntactically and semantically correct commands
RU2013142876 2013-09-23
RU2013149976 2013-11-11
RU2013149976/08A RU2546058C1 (en) 2013-11-11 2013-11-11 Method of formation of relational description of command syntax

Publications (1)

Publication Number Publication Date
WO2015041575A1 true WO2015041575A1 (en) 2015-03-26

Family

ID=52689141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/RU2014/000703 WO2015041575A1 (en) 2013-09-23 2014-09-23 Method for generating syntactically and semantically correct commands

Country Status (1)

Country Link
WO (1) WO2015041575A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5812840A (en) * 1994-03-24 1998-09-22 Speedware Ltee./Ltd. Database query system
US5937409A (en) * 1997-07-25 1999-08-10 Oracle Corporation Integrating relational databases in an object oriented environment
US20050273775A1 (en) * 2004-06-07 2005-12-08 Brookes Craig W Apparatus, system, and method for identifying semantic errors in assembly source code
US7890978B2 (en) * 2000-04-06 2011-02-15 Opentv, Inc. Generic data processing engine
US8010952B2 (en) * 2004-06-08 2011-08-30 Cisco Technology, Inc. Method and apparatus for configuration syntax and semantic validation
US8156474B2 (en) * 2007-12-28 2012-04-10 Cadence Design Systems, Inc. Automation of software verification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5812840A (en) * 1994-03-24 1998-09-22 Speedware Ltee./Ltd. Database query system
US5937409A (en) * 1997-07-25 1999-08-10 Oracle Corporation Integrating relational databases in an object oriented environment
US7890978B2 (en) * 2000-04-06 2011-02-15 Opentv, Inc. Generic data processing engine
US20050273775A1 (en) * 2004-06-07 2005-12-08 Brookes Craig W Apparatus, system, and method for identifying semantic errors in assembly source code
US8010952B2 (en) * 2004-06-08 2011-08-30 Cisco Technology, Inc. Method and apparatus for configuration syntax and semantic validation
US8156474B2 (en) * 2007-12-28 2012-04-10 Cadence Design Systems, Inc. Automation of software verification

Similar Documents

Publication Publication Date Title
US7185317B2 (en) Logical data modeling and integrated application framework
CN101454779B (en) Search-based application development framework
US7899837B2 (en) Apparatus and method for generating queries and reports
US7693857B2 (en) Clinical genomics merged repository and partial episode support with support abstract and semantic meaning preserving data sniffers
EP1585036A2 (en) Management of parameterized database queries
US9684699B2 (en) System to convert semantic layer metadata to support database conversion
US11720631B2 (en) Tool to build and store a data model and queries for a graph database
US7668888B2 (en) Converting object structures for search engines
US20080016048A1 (en) Intelligent condition pruning for size minimization of dynamic, just in time tables
US11086860B2 (en) Predefined semantic queries
JP2006172446A (en) Complex data access
GB2405499A (en) Information system development
JP5927886B2 (en) Query system and computer program
US8204895B2 (en) Apparatus and method for receiving a report
Inala et al. WebRelate: integrating web data with spreadsheets using examples
US5943665A (en) Method and system for performing conceptual joins across fields of a database
Ba et al. Uncertain version control in open collaborative editing of tree-structured documents
US20070067254A1 (en) Business model data management
WO2015041575A1 (en) Method for generating syntactically and semantically correct commands
Tang et al. Ontology-based semantic retrieval for education management systems
RU2546058C1 (en) Method of formation of relational description of command syntax
US20150046494A1 (en) Main-memory based conceptual framework for file storage and fast data retrieval
RU2534823C1 (en) Method of generating syntactically and semantically correct commands
Languedoc Build iOS database apps with Swift and SQLite
JP5296128B2 (en) Structured document management apparatus, method and program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14845134

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14845134

Country of ref document: EP

Kind code of ref document: A1