Attempto, Prolog, and OWL

@CapelliC, I see in this thread you wrote that “Variables are the most general term in Prolog, and works in facts the same they do in rules. I think these are a big payload of APE, providing ready (and easy) to use semantic data, waiting for binding to application data.” Like the original poster, I’m struggling to make APE output useful. @jan , do you have any experience with APE at all?

I’m copy-pasting output from the APE command-line tool into the SWI-Prolog window and it accepts the entries. But, the format (to me) is convoluted. I’m not sure how to query it! Using an example from the Attempto website and specifying first-order-logic output in a terminal window:

PS D:\Documents\Programming\Attempto\APE-master> ./ape.exe -text "John is a rich customer." -cfol
<?xml version="1.0" encoding="UTF-8"?>

<apeResult>
  <duration tokenizer="0.015" parser="0.000" refres="0.000"/>
  <fol>exists(A,exists(B,&amp;(object(C,A,customer,countable,na,eq,1)-1/5,&amp;(property(C,A,rich,pos)-1/4,predicate(C,B,be,named('John'),A)-1/2))))</fol>
  <messages/>
</apeResult>

What do these ampersands mean? What are the terms that look like fractions (e.g. -1\5)? Regardless, I copy-paste the result into SWI-Prolog’s window, changing &amp to @.

?- assert(exists(A,exists(B,@;(object(C,A,customer,countable,na,eq,1)-1/5,@;(property(C,A,rich,pos)-1/4,predicate(C,B,be,named('John'),A)-1/2))))).
true.

I can get back bits and pieces using exists(A,B). but nothing coherent. How would I query the database to ask “Is anyone rich?”, “Is anyone a customer?”, or ask what properties John has?