/** Demonstrates usage of isQueryTrue api function. */ protected void demo13() throws IOException, UnknownHostException, CycApiException { Log.current.println("Demonstrating isQueryTrue api function.\n"); CycFormulaSentence gaf = cycAccess.makeCycSentence("(#$likesAsFriend #$BillClinton #$JimmyCarter)"); CycFort mt = cycAccess.getKnownConstantByName("PeopleDataMt"); InferenceParameters queryProperties = new DefaultInferenceParameters(cycAccess); boolean isQueryTrue = cycAccess.isQueryTrue(gaf, mt, queryProperties); if (isQueryTrue) Log.current.println("\nThe assertion\n" + gaf + "\nis true in the " + mt.cyclify()); else Log.current.println( "\nThe assertion\n" + gaf + "\nis not known to be true in the " + mt.cyclify()); }