tuffy.test
Class InferenceTest

java.lang.Object
  extended by tuffy.main.Infer
      extended by tuffy.test.InferenceTest

public class InferenceTest
extends Infer

Testing class for Inference.


Field Summary
 
Fields inherited from class tuffy.main.Infer
db, dmover, grounding, mln, options
 
Constructor Summary
InferenceTest()
           
 
Method Summary
private  java.lang.String getSimpleInferenceResult()
           
 void test_hardClause()
          Test inference on whether it can deal with hard clause constrains.
 void test_initStatic()
           
 void test_MCSAT_inference()
          Test marginal inference on a small RC set.
 void test_simpleInference()
          Test inference on simple manually generated MLN world.
 void test_WalkSAT_inference()
          Test MAP inference on a small RC set.
 
Methods inherited from class tuffy.main.Infer
cleanUp, ground, loadMLN, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InferenceTest

public InferenceTest()
Method Detail

test_MCSAT_inference

public final void test_MCSAT_inference()
                                throws java.lang.Exception
Test marginal inference on a small RC set. This test is automatically passed, and will be MANUALLY compared with Alchemy's output. If there are no significant differences, it is regarded as real pass.

Throws:
java.lang.Exception

test_WalkSAT_inference

public final void test_WalkSAT_inference()
                                  throws java.lang.Exception
Test MAP inference on a small RC set. This test is automatically passed, and will be MANUALLY compared with Alchemy's output. If there are no significant differences, it is regarded as real pass.

Throws:
java.lang.Exception

test_hardClause

public final void test_hardClause()
                           throws java.lang.Exception
Test inference on whether it can deal with hard clause constrains. This test is passed if the output of both marginal and MAP inference obey all the hard clauses.

Throws:
java.lang.Exception

test_initStatic

public final void test_initStatic()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getSimpleInferenceResult

private final java.lang.String getSimpleInferenceResult()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

test_simpleInference

public final void test_simpleInference()
                                throws java.lang.Exception
Test inference on simple manually generated MLN world. The MAP truth assignment of this world is manually calculated. This test is passed if the Tuffy output is consistent with manual calculation.

Throws:
java.lang.Exception