Grailog KS Viz 2.0: graph-logic knowledge visualization by XML-based translation

Thumbnail Image



Journal Title

Journal ISSN

Volume Title


University of New Brunswick


Knowledge visualization is the expression of knowledge through graphical presentations with the goal of validating or communicating knowledge. Formal knowledge, which is used in Data Modeling, the Semantic Web, etc., is based on ontologies and rules, which can be represented in (Description and Horn) logics and presented as (generalized) graphs. Graph Inscribed Logic (Grailog) can be used to visualize RuleML knowledge. The earlier Grailog KS Viz transforms Datalog RuleML to Grailog visualizations in Scalable Vector Graphics (SVG). This thesis develops a tool, Grailog KS Viz 2.0, that is able to visualize Horn Logic (Hornlog) with Equality. It uses XSLT 2.0 with internal JavaScript to process arbitrary levels of function nesting in a recursive manner. The tool has also been extended from n-ary relations with n ≥ 2 to those with n ≥ 1 (including classes as unary relations), based on the labelnode normal form of Grailog. JavaScript is used to calculate the coordinates for positioning, and determines the dimensions of, the SVG elements and viewport, but is no longer required in the static image. Our Purifier thus removes the internal JavaScript from the static Grailog/SVG visualization generated by the tool. This assures that there are no malicious scripts, reduces the time required to render the Grailog/SVG visualization, and greatly reduces the final file size. The visualization of function applications with multiple levels of nesting generated by Grailog KS Viz 2.0 was evaluated using test cases that illuminate knowledge about graph-theoretical definitions. A larger use case was developed for teaching the business rules of managing the financial aspect of a non-profit organization. The processing speed as well as quality and accuracy of the rendered SVG are consistently high across common modern Web browsers. Grailog KS Viz 2.0 thus provides increased security, expressivity, and efficiency for viewing, sharing, and storing Grailog/SVG visualizations.