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)

**** (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 "") (apply logDev (concat "evidencePath: " evidencePath))))
***(g2dexe graphics2d (seq (define evidencePath (concat "file://" (sinvoke "g2d.util.IO" "resolveLinks" "./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)))

****  Testing
**** (createDefBasicOps JSONB/basicopsX.json PROTEINOPS CHEMICALOPS )


**** initialize viewer kb
(createDefBasicUJKB JSONU RKB PROTEINOPS CHEMICALOPS)

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

(g2dexe graphics2d (seq (apply setStandardLabelsKB "RKB")(apply logDev "setStandardLabelsKB")))

(g2dexe graphics2d (seq (apply setModelName "RKB" "SmallKB") (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"))

)

