load all
load ../../PLALib/load-jpla-parts

**** from scratch *************************************************************

(seq
(g2dexe graphics2d (supdate "g2d.pla.PLA" "developmental" (boolean true)))
(loadg2dlib graphics2d ../../PLALib/load-jg2dlib.lsp)

(initPLAeset maude graphics2d graphics2d)
(initKBManagerD graphics2d QQQ)            ---- puts up progress bar
(initDishes QQQ)

**** create the kb and its graph
**** (initDKBnet RKB QQQ allDish)
(initDAKBnet RKB QQQ)
(initKBgraph RKB)
(initOccMap RKB)

**** save kb and its graph
(save RKB-tkb.txt  C  entry tval tkb RKB)
(saveKBG RKB QQQ RKB-graph.txt)
(save RKB-occmap.txt  C  entry qval occmap RKB)
(save allDish.txt  C  entry tval dish allDish)


**** restore hand crafted evidence
(restore evidence.txt tmp entry)
(g2dexe graphics2d (seq (define evidencePath (concat "file://" (sinvoke "g2d.util.IO" "resolveLinks" "./evidence"))) (apply logDev (concat "evidencePath: " evidencePath))))
**** (g2dexe graphics2d (seq (define evidencePath (concat "file://" (sinvoke "g2d.util.IO" "resolveLinks" "/Users/amk/evidence"))) (apply logDev (concat "evidencePath: " evidencePath))))

**** user preferences
(g2dexe graphics2d (seq (define useChattyLabels (boolean true))(apply logDev useChattyLabels)))
(g2dexe graphics2d (seq (define explorerCheckBoxDefault (boolean true))(apply logDev explorerCheckBoxDefault)))


**** initialize viewer kb
(createDefBasicUJKB JSONU RKB PROTEINOPS CHEMICALOPS GENEOPS SIGNATUREOPS STRESSOPS)

(g2dexe graphics2d (seq (apply initJKB "RKB") (apply loadbasicjkb "RKB" "JSONU")))

**** new for managing occ labels
(g2dexe graphics2d (seq (apply setStandardLabelsKB "RKB")(apply logDev "setStandardLabelsKB")))

(g2dexe graphics2d (seq (apply setModelName "RKB" "STM7") (apply logDev (concat "ModelName: " (apply getModelName "RKB"))) ))

(startListener RKB graphreq graphics2d)
(defineKBGraph RKB graphics2d)              ---- stops progress bar

*** needed while Maude is in control of nids
(g2dexe graphics2d  (apply fixNids "RKB"))

)

