The XJ library allows an programmer to declare how prolog terms are rendered
in the Java-implemented Graphical User Interface (GUI), capturing user actions and
invoking XSB functions. Prolog data is shown and editable in the GUI, through
Swing-derived objects; GUI changes propagate transparently (unless errors occur) to
Prolog predicates in memory, as GUI objects are closed or unfocused
Data structures can be constructed in XSB and then sent to Java to define a
presentation on the user's screen and to specify how graphical user actions
are to invoke XSB functions. This architecture makes it very easy to
construct sophisticated, flexible GUIs with very little effort for XSB-based
applications. XSB and XJ communicate using a lower-level open-source
protocol called
InterProlog,
which reflects XSB data structures into the Java data space, and vice versa.