public static final void exampleInferenceParameters() {
    System.out.println("Starting inference parameters examples.");
    try {
      // Note: The available inference engine parameters and descriptions are documented
      // in the KB and can be viewed using the Cyc browser. The inference parameters will
      // be isas of InferenceParameter. The Symbol name to use will be documented
      // as a rewriteOf assertion on the inference parameter.
      // Note: NIL can be passed by using CycObjectFactory.nil
      InferenceParameters inferenceParameters = new DefaultInferenceParameters(access);
      inferenceParameters.setMaxTime(10);
      inferenceParameters.setMaxNumber(100);
      inferenceParameters.setMaxTransformationDepth(2);
      inferenceParameters.put(new CycSymbol(":ALLOW-INDETERMINATE-RESULTS?"), Boolean.FALSE);
      ELMt inferencePSC = access.makeELMt("InferencePSC");
      CycFormulaSentence query = CycLParserUtil.parseCycLSentence("(isa ?X Dog)", true, access);
      InferenceWorkerSynch worker = new DefaultInferenceWorkerSynch(query,
              inferencePSC, inferenceParameters, access, 10000);
      List answers = null;
      try {
        answers = worker.performSynchronousInference(); // Note: workers are 1-shot, don't call more than once
        System.out.println("Got " + answers.size() + " paramaterized inference answers: " + answers);
      } finally {
        // If inference resources are not released, they can accumulate, causing a memory leak.
        worker.releaseInferenceResources(60000);
      }
      worker = new DefaultInferenceWorkerSynch(query,
              inferencePSC, null, access, 10000);
      try {
        answers = worker.performSynchronousInference();
        System.out.println("Got " + answers.size() + " non-paramaterized inference answers: " + answers);
      } finally {
        // If inference resources are not released, they can accumulate, causing a memory leak.
        worker.releaseInferenceResources(60000);
      }
    } catch (UnknownHostException nohost) {
      nohost.printStackTrace();
    } catch (IOException io) {
      io.printStackTrace();
    } catch (CycApiException cyc_e) {
      cyc_e.printStackTrace();
    } catch (Exception e) {
      e.printStackTrace();
    }
    System.out.println("Finished.");
  }