A method, device, and computer-readable storage medium for obtaining a LTLf minimum automaton
Through Brzozowski theory and the API of tools MONA and SPOT, we directly construct the LTLf minimization automaton, which solves the state explosion problem in the conversion from LTLf to DFA, realizes the rapid acquisition of the minimum DFA, and improves the conversion performance.
Patent Information
- Application Number
- CN202011101650.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-15
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2040-10-15
AI Technical Summary
In the existing technology, the conversion process from LTLf to DFA suffers from the state explosion problem, resulting in excessive time and space loss. Mainstream methods such as the Hopcroft method require constructing a non-minimized DFA before minimizing it, which cannot avoid the double exponential state explosion.
Adopting Brzozowski theory, a two-step segmentation method is used to directly construct the LTLf minimization automaton using the API of the tools MONA and SPOT, including reverse DFA construction, inversion, subset construction and reachable state calculation, thus avoiding the construction process of non-minimized DFA.
It effectively avoids the double exponential state explosion, improves the conversion performance from LTLf to minimum DFA, and realizes the rapid acquisition of the minimized automaton.
Smart Images

Figure CN114371849B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of conversion from LTLf to automaton DFA. Utilizing the Brzozowski minimization automaton construction theory, the first LTLf to minimal DFA conversion method based on Brzozowski theory is proposed. This method avoids as much as possible the double exponential growth and subsequent minimization process from LTLf directly to non-minimized DFA in currently commonly used algorithms, thereby improving the conversion performance from LTLf to minimal DFA. Background Art
[0002] Finite Linear Temporal Logic (LTLf) is a commonly used property description language in the field of artificial intelligence and robotics. The conversion of LTLf to a finite state automaton (DFA) is a frequently encountered and sometimes indispensable process in LTLf applications. However, the LTLf-to-DFA conversion process is extremely complex. In the worst case, a LTLf formula of length n can produce a DFA with a doubly exponential number of states, leading to a state explosion problem that incurs significant time and space losses. The current mainstream DFA minimization technique is the Hopcroft method, but this method suffers from the drawback that it requires first constructing a DFA and then performing the minimization process. Therefore, it cannot avoid the doubly exponential state explosion that occurs when constructing a non-minimized DFA directly from LTLf. Summary of the Invention
[0003] This paper presents a method for directly obtaining a minimal LTLf automaton, addressing the state explosion problem encountered in the actual LTLf-to-DFA construction. This method leverages Brzozowski theory to implement a two-step process for constructing the LTLf-to-DFA. The tool MONA is used to construct the LTLf-to-inverse DFA. The automaton is then inverted, followed by subset construction and reachable state calculation to obtain the minimum DFA.
[0004] The goal of the present invention is to provide a method for directly obtaining an LTLf minimization automaton. This method utilizes the Brzozowski minimization automaton construction theory to perform a two-step split on the LTLf to DFA construction. This method mainly addresses the state explosion problem encountered in the commonly used LTLf to DFA construction, avoids the subsequent Hopcroft minimization operation of the non-minimized concrete DFA construction, and is more conducive to quickly obtaining the minimum DFA corresponding to the LTLf.
[0005] A method for directly obtaining the LTLf minimization automaton includes the following steps:
[0006] Step 1: Replace the temporal logic operators of the given LTLf formula to obtain the corresponding PLTLf formula. The language received by the PLTLf formula is the reverse sequence of the language received by the original LTLf formula;
[0007] Step 2: Encode the PLTLf formula in step 1 using first-order logic (FOL) to obtain a FOL formula. The language accepted by this FOL formula is equivalent to the language accepted by the PLTLf formula, and is therefore the reverse sequence of the language accepted by the given LTLf formula in step 1.
[0008] Step 3: Use the FOL formula in step 2 as input to the tool MONA to obtain a deterministic automaton A, where the state set of A is concrete but the transition edges are symbolic. The receiving language of automaton A is the reverse sequence of the receiving language of the given LTLf formula in step 1;
[0009] Step 4: Invert automaton A to obtain a non-deterministic automaton N. Perform determinization and reachable state calculation on N to obtain a minimal deterministic automaton D corresponding to the LTLf formula in step 1.
[0010] The step 4 comprises:
[0011] Step 4.1: Perform the subset construction method on N to obtain a deterministic automaton
[0012] Step 4.2: Traverse all states of the automaton obtained in step 4.1, keep only reachable states, and delete all unreachable states. The deterministic automaton D obtained in this way is the smallest.
[0013] In step 4.1, the API provided by the tool SPOT is used to convert N into a weakly nondeterministic Buchi automaton WN. Given NFA N = (P, S, S0, H, Acc), the specific operations are as follows:
[0014] 1) Introduce a new state sink;
[0015] 2) Introduce a new variable
[0016] 3) For each receiving state s in Acc, add a transition edge from s to sink, with the transition condition being
[0017] 4) For each migration edge in N, change the migration condition λ to λ∧alive;
[0018] 5) For the new state sink, add a migration condition as Self-circulation;
[0019] 6) Mark the state sink as the only receivable state;
[0020] After obtaining WN, the API function tgba_powerset() provided by SPOT is called to complete the automaton determinization operation. This function returns the weakly deterministic Buchi automaton WB.
[0021] In step 4.2, the SPOT API function is called to complete the reachable state calculation. The corresponding function is purge-unreachable_states(). The automaton WB obtained in step 4.1 is used as input. The automaton WB' returned by this function only includes reachable states. WB' is then pruned to obtain the corresponding DFA. The specific operations are as follows:
[0022] 1) Remove the only receivable state {sink} and all migration edges to and from {sink};
[0023] 2) Assign the alive variable on all remaining migration edges to true, thereby deleting the alive variable;
[0024] 3) Set all the conditions The state that migrates to {sink} under alive is defined as the acceptable state of the final DFA.
[0025] In the present invention, the automaton A is A=(P, S, s0, H, Acc), where:
[0026] 1) P is a set of variables;
[0027] 2) S is a set of states;
[0028] 3) s represents the initial state;
[0029] 4) H represents the migration relationship, H: S×2 P →S;
[0030] 5) Is the set of receiving states.
[0031] In the present invention, the automaton N is N=(P, S, Acc, H R , {s0}), where:
[0032] 1) P is a set of variables that is consistent with A;
[0033] 2) S is a set of states that is consistent with A;
[0034] 3) Acc represents the set of initial states. Due to the inversion of the automaton, the receiving state in A is changed to the initial state in N.
[0035] 4)H R represents the migration relationship, H R ={(s′,λ,s)|(s,λ,s′)∈H};
[0036] 5) {s0} is the set of receiving states that turn the initial state in A into a receiving state in N due to the inversion of the automaton.
[0037] The present invention also proposes a device comprising: a memory and a processor; a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned method for obtaining the LTLf minimization automaton is implemented.
[0038] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for obtaining the LTLf minimization automaton is implemented.
[0039] This paper applies Brzozowski theory to the construction of LTLf minimization automata for the first time, presenting a novel approach to constructing LTLf minimization automata. This approach maximizes the use of the APIs provided by the currently popular SPOT and MONA libraries, effectively improving the construction of LTLf minimization automata. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic flow diagram of the method of the present invention. DETAILED DESCRIPTION
[0041] The invention is further described in detail with reference to the following specific examples and accompanying drawings. The processes, conditions, experimental methods, etc. for implementing the present invention, except for those specifically mentioned below, are common knowledge and common common sense in the art and are not particularly limited by the present invention.
[0042] The present invention proposes a method for constructing a finite linear temporal logic (LTLf) over finite traces to a minimized finite state automaton (DFA). The method is based on Brzozowski's minimal automaton construction theory to complete the construction of the LTLf to a minimal DFA. The method comprises: for a given LTLf formula, first using the tool MONA to construct a reverse deterministic automaton corresponding to the LTLf, which can receive the reverse sequence of the original LTLf receiving language; inverting the reverse deterministic automaton to obtain a nondeterministic finite state automaton (NFA); performing a subset construction method calculation on the NFA, and then performing a reachable state calculation after the calculation, thereby deleting all unreachable states. According to Brzozowski's theory, the DFA is the minimized DFA corresponding to the LTLf formula.
[0043] The present invention proposes a method for directly obtaining the LTLf minimization automaton. The specific implementation is described as follows:
[0044] Step 1: The given LTLf formula syntax format is:
[0045] φ=true|false|p|Xφ|Fφ|φ1Uφ2
[0046] Use the syntax parser to parse the LTLf formula, complete the temporal logic operator replacement, and obtain the corresponding PLTLf formula. The PLTLf formula syntax format is:
[0047] ψ=true|false|p|Bψ|Yψ|ψ1Sψ2
[0048] During the operator replacement process, X, F, and u correspond to operators B, Y, and S respectively. The language received by the PLTLf formula after replacement is the reverse sequence of the language received by the original LTLf formula.
[0049] Step 2: Encode the PLTLf formula in step 1 using first-order logic (FOL) to obtain a FOL formula. The language accepted by this FOL formula is equivalent to the language accepted by the PLTLf formula, and is therefore the reverse sequence of the language accepted by the LTLf formula in step 1.
[0050] Step 3: Use the FOL formula in step 2 as input to the tool MONA, resulting in a deterministic automaton A, where the state set of A is concrete but the transition edges are symbolic. The receiving language of automaton A is the reverse sequence of the receiving language of the given LTLf formula in step 1. Automaton A is represented by A = (P, S, s0, H, Acc), where:
[0051] 1) P is a set of variables;
[0052] 2) S is a set of states;
[0053] 3) s represents the initial state;
[0054] 4) H represents the migration relationship, H: S×2 P →S;
[0055] 5) Is the set of receiving states.
[0056] Step 4: Invert the automaton A to obtain a non-deterministic automaton N. Perform determinization and reachable state calculation on N to obtain a minimal deterministic automaton D corresponding to the LTLf formula in step 1. The non-deterministic automaton obtained by inversion is N = (P, S, Acc, H R , {s0}), where:
[0057] 1) P is a set of variables that is consistent with A;
[0058] 2) S is a set of states that is consistent with A;
[0059] 3) Acc represents the set of initial states. Due to the inversion of the automaton, the receiving state in A is changed to the initial state in N.
[0060] 4)H R represents the migration relationship, H R ={(s′,λ,s)|(s,λ,s′)∈H};
[0061] 5) {s0} is the set of receiving states that turn the initial state in A into a receiving state in N due to the inversion of the automaton.
[0062] Step 4.1: Perform the subset construction method on N to obtain a deterministic automaton.
[0063] In this process, we need to use the API provided by the tool SPOT, but SPOT is an automaton operation platform for infinite sequences. Therefore, in order to call SPOT's API, we need to convert N into a weak nondeterministic Buchi automaton (wNBA), represented here by WN. Given NFA N = (P, S, S0, H, Acc), the specific operations are as follows:
[0064] 1) Introduce a new state sink;
[0065] 2) Introduce a new variable
[0066] 3) For each receiving state s in Acc, add a transition edge from s to sink, with the transition condition being alive;
[0067] 4) For each migration edge in N, change the migration condition λ to λ∧alive;
[0068] 5) For the new state sink, add a migration condition as alive's self-loop;
[0069] 6) Mark the state sink as the only receivable state.
[0070] After obtaining WN, the API function tgba_powerset() provided by SPOT is called to complete the automaton determinization operation. The function returns a weak deterministic Buchi automata (wDBA), which is represented by WB here.
[0071] Step 4.2: Traverse all states of the automaton obtained in step 4.1, keep only reachable states, and delete all unreachable states. The deterministic automaton D obtained in this way is the smallest.
[0072] During this process, we still need to call SPOT's API function to complete the reachable state calculation. The corresponding function is purge_unreachable_states(). The automaton WB obtained in step 4.1 is used as input. The automaton WB' returned by this function only includes reachable states. WB' is then pruned to obtain the corresponding DFA. The specific operation is as follows:
[0073] 1) Remove the only receivable state {sink} and all migration edges to and from {sink};
[0074] 2) Assign the alive variable on all remaining migration edges to true, thereby deleting the alive variable;
[0075] 3) Set all the conditions The state that migrates to {sink} under alive is defined as the acceptable state of the final DFA.
[0076] The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the inventive concept, changes and advantages that can be thought of by those skilled in the art are included in the present invention and are protected by the appended claims.
Claims
1. A method for obtaining a LTLf minimal automaton, characterized in that: The steps include: Step 1: Replace the temporal logic operators of the given LTLf formula to obtain the corresponding PLTLf formula; the language received by the PLTLf formula is the reverse sequence of the language received by the LTLf formula; Step 2: Perform first-order logic encoding on the PLTLf formula in step 1 to obtain a FOL formula; the language received by the FOL formula is equivalent to the receiving language of the PLTLf formula, which is the reverse sequence of the receiving language of the LTLf formula in step 1; Step 3: Use the FOL formula in step 2 as input to the tool MONA to obtain a deterministic automaton A, where the state set of A is concretized and the transition edges are symbolized; the receiving language of A is the reverse sequence of the receiving language of the LTLf formula in step 1; A=(P1,S1,s 01 , H1, Acc1), where: 1) P1 is a set of variables; 2) S1 is a set of states; 3)s 01 Represents the initial state; 4) H1 represents the migration relationship, H1: 5) is the set of receiving states; Step 4: Invert A to obtain a non-deterministic automaton N; perform determinization and reachable state calculation on N to obtain a minimal deterministic automaton D corresponding to the LTLf formula in step 1; N=(P2,S2,Acc2,H R ,{s 01 '}),in: 1) P2 is a set of variables that is consistent with A; 2) S2 is a set of states that is consistent with A; 3) Acc2 represents the set of initial states. Due to the inversion of the automaton, the receiving state in A is changed to the initial state in N. 4)H R represents the migration relationship, H R ={(s',λ,s)|(s,λ,s')∈H R }; 5){s 01 '} is the set of receiving states, which transforms the initial state in A into a receiving state in N due to the inversion of the automaton; The step 4 comprises: Step 4.1: Perform a subset construction method on N to obtain a deterministic automaton; In step 4.1, the API provided by the tool SPOT is used to convert N into a weakly nondeterministic Buchi automaton WN. The specific operations are as follows: 1) Introduce a new state sink; 2) Introduce a new variable 3) For each receiving state s in Acc2, add a transition edge from s to sink with the transition condition 4) For each migration edge, change the migration condition λ to λ∧alive; 5) For the new state sink, add a migration condition as Self-circulation; 6) Mark the state sink as the only receivable state; After obtaining WN, call the API function tgba_powerset() provided by SPOT to complete the automaton determinization operation. The function tgba_powerset() returns the weakly deterministic Buchi automaton WB. Step 4.2: Traverse all states of the deterministic automaton obtained in step 4.1, retain the reachable states, delete all unreachable states, and obtain the minimum deterministic automaton D; In step 4.2, the SPOT API function is called to complete the reachable state calculation. The corresponding function is purge_unreachable_states(). The WB obtained in step 4.1 is used as input. The function purge_unreachable_states() returns a weakly deterministic Buchi automaton WB' that only includes reachable states. WB' is then pruned to obtain the corresponding finite state automaton. The specific operations are as follows: 1) Remove the only sink that can receive the state, and remove all migration edges to and from the sink; 2) Assign the alive variable of all remaining migration edges to true and delete the alive variable; 3) Set all the conditions The state that migrates to the sink is defined as the acceptable state of the final finite state automaton.
2. The method for obtaining the LTLf minimum automaton according to claim 1, characterized in that: The given LTLf formula syntax format is: φ=true|false|p|Xφ|Fφ|φ1Uφ2; The syntax format of the PLTLf formula is: ψ=true|false|p|Bψ|Yψ|ψ1Sψ2; in the operator replacement process, X, F, and U correspond to operators B, Y, and S respectively.
3. A device, characterized in that include: memory and processor; A computer program is stored in the memory, and when the computer program is executed by the processor, the method according to claim 1 or 2 is implemented.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claim 1 or 2 is implemented.