Reasoner
Class StaticReasoner

java.lang.Object
  |
  +--Reasoner.StaticReasoner

public class StaticReasoner
extends java.lang.Object

Sets up the plausibility intervals for the dimensions of each concept instance in the semantic network, determines the constraints that will need to be satisfied in their layout for rendering, selects the appropriate model, and backfills any early inferences into the semantic network. Early inferences are shared by all semantic networks in a simulation, whereas late dependencies differ based on particular solution sets.

Version:
Created 3 September 2003
Author:
Dan Tappan
See Also:
ObjectTemplateSet, SimulationEngine, DynamicReasoner

Field Summary
private  java.lang.String EXTRINSIC_FIELD_NAME
           
private  KnowledgeBase m_knowledge_base
           
private  ObjectTemplateSet m_object_template_set
           
private  SemanticNetwork m_semantic_network
           
static java.lang.String PROPERTY_NAME_DEPTH
           
static java.lang.String PROPERTY_NAME_HEIGHT
           
static java.lang.String PROPERTY_NAME_WIDTH
           
 
Constructor Summary
StaticReasoner(SemanticNetwork semantic_network, KnowledgeBase knowledge_base, java.lang.String viewer_position)
          Creates a new static reasoner that builds an object template set of results.
 
Method Summary
private  void build(java.lang.String viewer_position)
          Builds and adds to the object template set object templates for all inferred constraints, early inferences, and dimensions for all concept instances.
private  void buildConstraintsAndEarlyInferencesAndModel(ConceptInstance concept_instance, ObjectTemplate object_template, java.lang.String viewer_position)
          Adds to the object template set all inferred constraints and to the semantic network all inferred attributes.
private  void buildDimensions(ConceptInstance concept_instance, ObjectTemplate object_template)
          Defines the plausibility intervals for the dimensions of each concept instance and adds them to the object template set.
 void computeExtrinsicFrameOfReference(ConstraintNode constraint_node, java.lang.String viewer_position)
          Remaps any fields that apply to extrinsic frame of reference so they correspond to the position of the viewer.
 KnowledgeBase getKnowledgeBase()
          Returns the knowledge base containing the implicit details of the description to reason over.
 ObjectTemplateSet getObjectTemplateSet()
          Returns the object template set built from the reasoning process.
 SemanticNetwork getSemanticNetwork()
          Returns the semantic network containing the explicit details of the description to reason over.
 java.lang.String toString()
          Returns a string representation of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_semantic_network

private SemanticNetwork m_semantic_network

m_knowledge_base

private KnowledgeBase m_knowledge_base

m_object_template_set

private ObjectTemplateSet m_object_template_set

EXTRINSIC_FIELD_NAME

private final java.lang.String EXTRINSIC_FIELD_NAME
See Also:
Constant Field Values

PROPERTY_NAME_HEIGHT

public static final java.lang.String PROPERTY_NAME_HEIGHT
See Also:
Constant Field Values

PROPERTY_NAME_WIDTH

public static final java.lang.String PROPERTY_NAME_WIDTH
See Also:
Constant Field Values

PROPERTY_NAME_DEPTH

public static final java.lang.String PROPERTY_NAME_DEPTH
See Also:
Constant Field Values
Constructor Detail

StaticReasoner

public StaticReasoner(SemanticNetwork semantic_network,
                      KnowledgeBase knowledge_base,
                      java.lang.String viewer_position)
               throws java.lang.Exception
Creates a new static reasoner that builds an object template set of results.

Parameters:
semantic_network - - the semantic network containing the explicit details of the description to reason over
knowledge_base - - the knowledge base containing the implicit details of the description to reason over
viewer_position - - the viewer position: north, south, east, or west.
Throws:
java.lang.Exception - - if the reasoning process fails
See Also:
getObjectTemplateSet()
Method Detail

build

private void build(java.lang.String viewer_position)
            throws java.lang.Exception
Builds and adds to the object template set object templates for all inferred constraints, early inferences, and dimensions for all concept instances.

Parameters:
viewer_position - - the viewer position: north, south, east, or west.
Throws:
java.lang.Exception - - if any constraints, inferences, or dimensions cannot be built

buildConstraintsAndEarlyInferencesAndModel

private void buildConstraintsAndEarlyInferencesAndModel(ConceptInstance concept_instance,
                                                        ObjectTemplate object_template,
                                                        java.lang.String viewer_position)
                                                 throws java.lang.Exception
Adds to the object template set all inferred constraints and to the semantic network all inferred attributes. Early inferences are shared by all semantic networks in a simulation, whereas late dependencies differ based on particular solution sets. This also selects the appropriate model.

Parameters:
concept_instance - - the concept instance encoding the constraints and early inferences
object_template - - the viewer position: north, south, east, or west.
Throws:
java.lang.Exception - - if any constraints or inferences cannot be built

buildDimensions

private void buildDimensions(ConceptInstance concept_instance,
                             ObjectTemplate object_template)
                      throws java.lang.Exception
Defines the plausibility intervals for the dimensions of each concept instance and adds them to the object template set.

Parameters:
concept_instance - - the concept instance encoding the dimensions
object_template - - the object template to define according to the encoding
Throws:
java.lang.Exception - - if any dimensions cannot be built

computeExtrinsicFrameOfReference

public void computeExtrinsicFrameOfReference(ConstraintNode constraint_node,
                                             java.lang.String viewer_position)
Remaps any fields that apply to extrinsic frame of reference so they correspond to the position of the viewer.

Parameters:
constraint_node - - the constraint node to adjust for any extrinsic frame of reference. This is an in-out parameter
viewer_position - - the viewer position: north, south, east, or west.

getKnowledgeBase

public KnowledgeBase getKnowledgeBase()
Returns the knowledge base containing the implicit details of the description to reason over.

Returns:
the knowledge base

getObjectTemplateSet

public ObjectTemplateSet getObjectTemplateSet()
Returns the object template set built from the reasoning process.

Returns:
the object template set

getSemanticNetwork

public SemanticNetwork getSemanticNetwork()
Returns the semantic network containing the explicit details of the description to reason over.

Returns:
the semantic network

toString

public java.lang.String toString()
Returns a string representation of this class.

Overrides:
toString in class java.lang.Object
Returns:
the String representation