Java Doc for AbstractResolutionInferenceEngine.java in  » Rule-Engine » Mandarax » org » mandarax » reference » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Rule Engine » Mandarax » org.mandarax.reference 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mandarax.reference.AbstractResolutionInferenceEngine

All known Subclasses:   org.mandarax.reference.ResolutionInferenceEngine3,  org.mandarax.reference.ResolutionInferenceEngine4,  org.mandarax.reference.ResolutionInferenceEngine,  org.mandarax.reference.ResolutionInferenceEngine2,
AbstractResolutionInferenceEngine
abstract public class AbstractResolutionInferenceEngine implements InferenceEngine,LogCategories(Code)
Abstract superclass for inference engines based on resolution. The design is rather modular - a selection rule, the unification algorithm and a loop checking algorithm used are public properties of the engine and can be configured. Note that by default we do not use loop checking, the default loop checker is the trivial do nothing implementation.
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   1.7.2


Field Summary
public  intMAXSTEPS
    
protected  InferenceEngineFeatureDescriptionsfeatureDescriptions
    
protected  LoopCheckingAlgorithmloopCheckingAlgorithm
    
protected  SelectionPolicyselectionPolicy
    
protected  SemanticEvaluationPolicysemanticEvaluationPolicy
    
protected  UnificationAlgorithmunificationAlgorithm
    

Constructor Summary
public  AbstractResolutionInferenceEngine()
     AbstractInferenceEngine constructor comment.

Method Summary
protected  ClausegetGoal(Query query)
     Build the first goal from the query.
public  LoopCheckingAlgorithmgetLoopCheckingAlgorithm()
     Get the loop checking algorithm.
public  intgetMaxNumberOfProofSteps()
     Get the maximum number of proof steps that should be performed.
public  intgetMaxSteps()
     Returns the max number of resolution steps.
protected  ListgetNextConstraintPool(List cp, Resolution r)
     Get the next constraint pool.
protected  ClausegetNextGoal(Clause c1, Clause c2, Resolution r)
     Build the next goal, i.e., remove the unified terms, join the remaining clauses, and apply the unifications.
public  SelectionPolicygetSelectionPolicy()
     Get the used selection policy.
public  SemanticEvaluationPolicygetSemanticEvaluationPolicy()
     Returns the semantic evaluation policy.
public  UnificationAlgorithmgetUnificationAlgorithm()
     Get the used unification algorithm.
protected  Listmerge(List v1, List v2, int skip)
     Merge both lists, skip the element at the index "skip" in the second list.
protected  voidnotifyListenersOnDerivationStart(Session session, boolean debugOn)
     Invoke a procedural attachment.
protected  voidnotifyListenersOnResult(Session session, boolean debugOn)
     Invoke a procedural attachment.
protected  ClauseperformSemanticalEvaluation(Clause c, Session session, boolean logOn)
     Try to execute literals in the clause, and remove those literals if the result ist true.
public  voidsetLoopCheckingAlgorithm(LoopCheckingAlgorithm anAlgorithm)
     Set a new loop checking algorithm.
public  voidsetMaxNumberOfProofSteps(int steps)
     Set the maximum number of proof steps that should be performed.
public  voidsetMaxSteps(int value)
     Sets the max number of resolution steps.
public  voidsetSelectionPolicy(SelectionPolicy aPolicy)
     Set a selection policy.
public  voidsetSemanticEvaluationPolicy(SemanticEvaluationPolicy policy)
     Sets the semantic evaluation policy.
public  voidsetUnificationAlgorithm(UnificationAlgorithm anAlgorithm)
     Set a unification algorithm.

Field Detail
MAXSTEPS
public int MAXSTEPS(Code)



featureDescriptions
protected InferenceEngineFeatureDescriptions featureDescriptions(Code)



loopCheckingAlgorithm
protected LoopCheckingAlgorithm loopCheckingAlgorithm(Code)



selectionPolicy
protected SelectionPolicy selectionPolicy(Code)



semanticEvaluationPolicy
protected SemanticEvaluationPolicy semanticEvaluationPolicy(Code)



unificationAlgorithm
protected UnificationAlgorithm unificationAlgorithm(Code)




Constructor Detail
AbstractResolutionInferenceEngine
public AbstractResolutionInferenceEngine()(Code)
AbstractInferenceEngine constructor comment.




Method Detail
getGoal
protected Clause getGoal(Query query)(Code)
Build the first goal from the query. a goal
Parameters:
  query - a query



getLoopCheckingAlgorithm
public LoopCheckingAlgorithm getLoopCheckingAlgorithm()(Code)
Get the loop checking algorithm. an algorithm



getMaxNumberOfProofSteps
public int getMaxNumberOfProofSteps()(Code)
Get the maximum number of proof steps that should be performed. If this number is reached without a result, the engine gives up. the max number of proof steps



getMaxSteps
public int getMaxSteps()(Code)
Returns the max number of resolution steps. int



getNextConstraintPool
protected List getNextConstraintPool(List cp, Resolution r)(Code)
Get the next constraint pool. a list replacements
Parameters:
  cp - the previous constraint pool
Parameters:
  r - a resulution



getNextGoal
protected Clause getNextGoal(Clause c1, Clause c2, Resolution r)(Code)
Build the next goal, i.e., remove the unified terms, join the remaining clauses, and apply the unifications. the next goal
Parameters:
  c1 - the first unified clause
Parameters:
  c2 - the second unified clause
Parameters:
  u - a resolution



getSelectionPolicy
public SelectionPolicy getSelectionPolicy()(Code)
Get the used selection policy. the used policy



getSemanticEvaluationPolicy
public SemanticEvaluationPolicy getSemanticEvaluationPolicy()(Code)
Returns the semantic evaluation policy. the current policy



getUnificationAlgorithm
public UnificationAlgorithm getUnificationAlgorithm()(Code)
Get the used unification algorithm. the used algorithm



merge
protected List merge(List v1, List v2, int skip)(Code)
Merge both lists, skip the element at the index "skip" in the second list. a new list
Parameters:
  v1 - the first list
Parameters:
  v2 - the second list
Parameters:
  skip - the index to be skipped in the second list



notifyListenersOnDerivationStart
protected void notifyListenersOnDerivationStart(Session session, boolean debugOn) throws InferenceException(Code)
Invoke a procedural attachment.
Parameters:
  session - a session
Parameters:
  debugOn - whether debug is switched on



notifyListenersOnResult
protected void notifyListenersOnResult(Session session, boolean debugOn) throws InferenceException(Code)
Invoke a procedural attachment.
Parameters:
  session - a session
Parameters:
  debugOn - whether debug is switched on



performSemanticalEvaluation
protected Clause performSemanticalEvaluation(Clause c, Session session, boolean logOn)(Code)
Try to execute literals in the clause, and remove those literals if the result ist true. E.g., the result of performing +[]-[L1,L2,2<4,L3] would be +[]-[L1,L2,2<4,L3]. If the parameter was +[]-[L1,L2,2>4,L3], null would be returned.

Check whether we should use the selection policy here, right now we use a from the left to the right policy.

A rather sensible question is how to handle exceptions that occur when evaluating literals. The approach taken here is that an exception will render the literal as "false".
Parameters:
  c - a clause
Parameters:
  session - a session
Parameters:
  logOn - indicates whether we should log another clause




setLoopCheckingAlgorithm
public void setLoopCheckingAlgorithm(LoopCheckingAlgorithm anAlgorithm)(Code)
Set a new loop checking algorithm.
Parameters:
  lp - a loop checker



setMaxNumberOfProofSteps
public void setMaxNumberOfProofSteps(int steps)(Code)
Set the maximum number of proof steps that should be performed. If this number is reached without a result, the engine gives up.
Parameters:
  steps - the max number of steps



setMaxSteps
public void setMaxSteps(int value)(Code)
Sets the max number of resolution steps.
Parameters:
  value - the max number of resolution steps



setSelectionPolicy
public void setSelectionPolicy(SelectionPolicy aPolicy)(Code)
Set a selection policy.
Parameters:
  aPolicy - the new selection policy



setSemanticEvaluationPolicy
public void setSemanticEvaluationPolicy(SemanticEvaluationPolicy policy)(Code)
Sets the semantic evaluation policy.
Parameters:
  policy - The policy to set



setUnificationAlgorithm
public void setUnificationAlgorithm(UnificationAlgorithm anAlgorithm)(Code)
Set a unification algorithm.
Parameters:
  anAlgorithm - the new algorithm



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.