CN103886377A - inspection method based on BDD - Google Patents

inspection method based on BDD Download PDF

Info

Publication number
CN103886377A
CN103886377A CN201410060723.0A CN201410060723A CN103886377A CN 103886377 A CN103886377 A CN 103886377A CN 201410060723 A CN201410060723 A CN 201410060723A CN 103886377 A CN103886377 A CN 103886377A
Authority
CN
China
Prior art keywords
bdd
rule
inspection method
inspection
convert
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201410060723.0A
Other languages
Chinese (zh)
Inventor
崔小磊
周启平
刘大鹏
任永青
陈星宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
Original Assignee
BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
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
Application filed by BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd filed Critical BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
Priority to CN201410060723.0A priority Critical patent/CN103886377A/en
Publication of CN103886377A publication Critical patent/CN103886377A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

The invention discloses knowledge database rule generation formula inspection method based on BDD, which is characterized in that the inspection method performing the following inspection steps on each inputted rule when an alpha node network of an inference machine is constructed based on the inference rules: converting a prior rule generation formulation Rp to corresponding BDD and detecting that whether the Rp can be satisfied through traversing the BDD, and converting a prior rule generation rule Rp to corresponding BDD and detecting whether the Rp can be permanently real through traversing the BDD. The invention realizes the rule that the filtering knowledge database has logic errors and realizes automatic inspection on the facts that whether the reference rule can be satisfied or can be permanently real.

Description

The inspection method of the knowledge base rule production based on BDD
Technical field
The invention belongs to expert system reasoning rule production soundness verification field, specifically, relate to a kind of inspection method of the knowledge base rule production based on BDD.
Background technology
Rule in expert system rule storehouse has identical structure, " if ... then ... " structure.Rule, by the left side (LHS, Left hand side), the right (RHS, Right hand side) two parts composition, forms if(LHS) then(RHS) structure.The left side (LHS) is made up of one or more positive and negative patterns, and (RHS) on the right is made up of one or more conclusions.Each pattern, all needs the corresponding fact to go coupling, if the pattern that a rule comprises is all met, claims so this rule to be satisfied.
Each pattern is represented with an atomic proposition, and the left side of rule 1 can be expressed as a propositional logic expression formula like this:
P=(template1arr1=5arr2=6arr3=‘X’)
Q=(template2arr1=6arr2=5arr3=‘X’)
R=(template3arr1=7arr2=1)
LHS=(P?or?Q)and?R
Because inference rule is write by the people with field specialty background, in the time that rule becomes complicated and tediously long, inevitably can there is mistake in the rule of writing.Wherein mistake in logic comprises that the LHS of production there will be unsatisfiable situation, or is forever genuine situation.Here " can not meet " refers to, it is true can making transition formula evaluation without any a variable assignments combination." being true forever " refers to, it is true that any variable assignments combination all can make transition formula evaluation, that is: this expression formula is " identically true formula ".These two kinds of mistakes in logic can cause the alpha node of RETE network to deposit unnecessary information, waste system resource, more serious problem is: when such logic error can allow inference machine derive, carry out a large amount of insignificant pattern match, reduced the efficiency of reasoning.Therefore, in expert system knowledge base should there are not this 2 kinds of situations in the LHS of rule.A rule being of practical significance must be satiable, and is not forever for genuine.
At present, the realization of inference machine adopts RETE algorithm conventionally, and all knowledge base rules are changed into mode network (being again alpha meshed network).Match pattern network design is efficiently the fact and rule to be carried out to Dynamic Matching during for expert system reasoning like this.But the alpha mode network constructing, has carried out multiplexingly to node, can not carry out the checking in logic of wall scroll rule.
Consideration to regular production logicality before combining, for regular production huge and complicated in knowledge base, whether we need a kind of automatable method to verify whether every rule can meet and are true forever.Check that once us inference rule finds can not meet or forever for genuine situation, this rule not joined in alpha mode network.
Summary of the invention
The technical problem to be solved in the present invention is to overcome above-mentioned defect, a kind of inspection method of the knowledge base rule production based on BDD is provided, in the time building the RETE network that represents knowledge base, the regular production of expert system is changed into Binary Decision Diagrams (BDD), by this BDD is carried out to logic analysis, can check out the rule that some have logic error, thereby reach the object that the rule of knowledge base is screened.
For addressing the above problem, the technical solution adopted in the present invention is:
A kind of inspection method of the knowledge base rule production based on BDD, it is characterized in that: described inspection method is in the time building the alpha meshed network of inference machine RETE network based on rules generating formula, the rule of each input carried out to following steps inspection:
1), convert an existing regular production Rp to corresponding BDD, check by traveling through this BDD whether Rp can meet;
2), convert an existing regular production Rp to corresponding BDD, by traveling through whether this BDD inspection Rp is true forever.
As the improved technical scheme of one, in described step 1), convert rules generating formula Rp to propositional logic expression formula P, then BDD form corresponding to P convert to.
As the improved technical scheme of one, described traversal step 2) middle this BDD generating, if the terminal node that can be 1 from the root node value of finding shows that expression formula Rp is satiable; Otherwise, show that Rp is unsatisfiable; If from root node, all terminal nodes of traversal are all 1, show that Rp is tautology.
Owing to having adopted technique scheme, compared with prior art, in the present invention, rule base is write by people, therefore when rule is tediously long or when complicated, understand unavoidably subsistence logic mistake.If the rule of subsistence logic mistake in knowledge base, can reduce the execution efficiency of inference machine.The present invention is in the time building the RETE network that represents knowledge base, the regular production of expert system is changed into Binary Decision Diagrams, by this BDD is carried out to logic analysis, can check out the rule that some have logic error, thereby reach the object that the rule of knowledge base is screened, realize the rule of filtering subsistence logic mistake in knowledge base, for to the satisfiability of inference rule with forever carry out automatable inspection for genuine situation.
Embodiment
Embodiment:
A kind of step of inspection method of the knowledge base rule production based on BDD is as follows:
Step 1: in the time building the alpha meshed network of inference machine RETE network based on rules generating formula, the rule of each input is carried out to following steps inspection;
Step 2: convert an existing regular production Rp to corresponding BDD, check by traveling through this BDD whether Rp can meet
Step 3: convert an existing regular production Rp to corresponding BDD, check by traveling through this BDD whether Rp is true forever.
In the present embodiment, in described step 1, convert rules generating formula Rp to propositional logic expression formula P, then BDD form corresponding to P convert to.
In step 2, this BDD generating in traversal step 2, if the terminal node that can be 1 from the root node value of finding shows that expression formula Rp is satiable; Otherwise, show that Rp is unsatisfiable.If from root node, all terminal nodes of traversal are all 1, show that Rp is tautology.
An inspection method for knowledge base rule production based on BDD builds alpha meshed network and starts from step 1, carries out following steps:
1), create root node;
2), take out a rule from knowledge base, such as rule 1;
3), whether whether the logical check method inspection rule 1 of use based on BDD can meet, and be identically true formula.If check and do not pass through, return to 2).
4), take out pattern X from rule 1, the parameter type in checking mode, if newtype adds a type node;
5), build alpha node and alpha register from pattern X.If also have other pattern in rule 1, return to 4).Otherwise, return to 2).
In the present embodiment, the implementation method of step 3 is as follows:
3.1), convert regular production left side LHS to corresponding binary decision tree BDT.
3.2), this binary decision tree is converted to Binary Decision Diagrams of equal value (BDD).This BDD is simplified and is obtained by the BDT in 3.1.
3.3), travel through whole terminal nodes of this Binary Decision Diagrams.If terminal node has 0 value also to have 1 value, inspection is passed through.Otherwise check and do not pass through.
The step that BDT simplification is obtained to BDD is:
1), in BDT, remove the terminal node of all repetitions, merge 1 all value nodes and 0 all value nodes.
2), remove unnecessary test node, node m is all pointed on all limits from node n, can remove node n, and m is directly pointed to in original n input limit.
3), remove the intermediate node of repetition., if (m is identical with the structure of subtree n), can delete a node (such as m), then whole the limit of original directive m directive n for 2 intermediate nodes.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (3)

1. the inspection method of the knowledge base rule production based on BDD, it is characterized in that: described inspection method is in the time building the alpha meshed network of inference machine RETE network based on rules generating formula, the rule of each input carried out to following steps inspection:
1), convert an existing regular production Rp to corresponding BDD, check by traveling through this BDD whether Rp can meet;
2), convert an existing regular production Rp to corresponding BDD, by traveling through whether this BDD inspection Rp is true forever.
2. according to the inspection method of the knowledge base rule production based on BDD described in claim 1, it is characterized in that: in described step 1), convert rules generating formula Rp to propositional logic expression formula P, then BDD form corresponding to P convert to.
3. according to the inspection method of the knowledge base rule production based on BDD described in claim 2, it is characterized in that: described traversal step 2) middle this BDD generating, if the terminal node that can be 1 from the root node value of finding, shows that expression formula Rp is satiable; Otherwise, show that Rp is unsatisfiable; If from root node, all terminal nodes of traversal are all 1, show that Rp is tautology.
CN201410060723.0A 2014-02-21 2014-02-21 inspection method based on BDD Pending CN103886377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410060723.0A CN103886377A (en) 2014-02-21 2014-02-21 inspection method based on BDD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410060723.0A CN103886377A (en) 2014-02-21 2014-02-21 inspection method based on BDD

Publications (1)

Publication Number Publication Date
CN103886377A true CN103886377A (en) 2014-06-25

Family

ID=50955259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410060723.0A Pending CN103886377A (en) 2014-02-21 2014-02-21 inspection method based on BDD

Country Status (1)

Country Link
CN (1) CN103886377A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529676A (en) * 2016-10-25 2017-03-22 胡煜州 Deductive lattice and reasoning method based on deductive lattice

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115559A1 (en) * 2001-12-13 2003-06-19 International Business Machines Corporation Hardware validation through binary decision diagrams including functions and equalities
CN101206816A (en) * 2006-12-15 2008-06-25 索尼株式会社 Operation processing apparatus, operation processing control method, and computer program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030115559A1 (en) * 2001-12-13 2003-06-19 International Business Machines Corporation Hardware validation through binary decision diagrams including functions and equalities
CN101206816A (en) * 2006-12-15 2008-06-25 索尼株式会社 Operation processing apparatus, operation processing control method, and computer program

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JAN FRISO GROOTE: "Equational Binary Decision Diagrams", 《LOGIC FOR PROGRAMMING AND AUTOMATED REASONING 2000》, 31 December 2000 (2000-12-31) *
陈丽: "基于BDD和SAT的形式验证方法的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, vol. 2007, no. 04, 15 October 2007 (2007-10-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529676A (en) * 2016-10-25 2017-03-22 胡煜州 Deductive lattice and reasoning method based on deductive lattice
CN106529676B (en) * 2016-10-25 2018-11-23 胡煜州 It is a kind of to deduce lattice and based on the inference method for deducing lattice

Similar Documents

Publication Publication Date Title
Bunel et al. Piecewise linear neural networks verification: A comparative study
Beame et al. Propositional proof complexity: Past, present and future
Leemans et al. Discovering block-structured process models from incomplete event logs
Batory Feature models, grammars, and propositional formulas
Lutz Complexity of terminological reasoning revisited
CN105893637A (en) Link prediction method in large-scale microblog heterogeneous information network
Razgon On OBDDs for CNFs of bounded treewidth
Cashmore et al. Planning as quantified boolean formula
CN102663190B (en) PPTL (propositional projection temporal logic) symbolic model checking method
Ahmadon et al. State number calculation problem of workflow nets
CN104267936A (en) Semantic tree based asynchronous dynamic push-down network reachability analysis method
CN103886377A (en) inspection method based on BDD
Daoudi et al. Constraint Acquisition with Recommendation Queries.
CN104537418A (en) From-bottom-to-top high-dimension-data causal network learning method
Radke HR* graph conditions between counting monadic second-order and second-order graph formulas
Nieuwenhuis SAT modulo theories: getting the best of SAT and global constraint filtering
Donnelly et al. The inverse method for the logic of bunched implications
Lee et al. Polynomially decomposable global cost functions in weighted constraint satisfaction
CN104657542A (en) MSVL (Modeling, Simulation and Verification Language)-based Petri network model detection method
Kataeva et al. Applying graph grammars for the generation of process models and their logs
Tan et al. An ontological and hierarchical approach for supply chain event aggregation
Lazić et al. Comparative study on applicability of four software size estimation models based on lines of code
Tamura A small model theorem for the hybrid μ-calculus
Vörös et al. Advanced saturation-based model checking of well-formed coloured Petri nets
Yang et al. Ordering heuristics for reliability evaluation of multistate systems using multistate multivalued decision diagrams

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Cui Xiaolei

Inventor after: Zhou Qiping

Inventor after: Liu Dapeng

Inventor after: Ren Yongqing

Inventor after: Chen Xingyu

Inventor after: Wang Jing

Inventor after: Li Yuming

Inventor after: Wei Ming

Inventor before: Cui Xiaolei

Inventor before: Zhou Qiping

Inventor before: Liu Dapeng

Inventor before: Ren Yongqing

Inventor before: Chen Xingyu

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: CUI XIAOLEI ZHOU QIPING LIU DAPENG REN YONGQING CHEN XINGYU TO: CUI XIAOLEI ZHOU QIPING LIU DAPENG REN YONGQING CHEN XINGYU WANG JING LI YUMING WEI MING

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140625