Re: GraphViz, PlantUML, and IdStrings

Henk Birkholz

Looks great!

Viele Grüße,


On 28.07.21 14:33, Alexios Zavras wrote:
If people haven’t seen it, our spec GitHub repo contains the diagrams produced by transforming the ontology to PlantUML: <>
-- zvr
*From:* Spdx-tech@... <Spdx-tech@...> *On Behalf Of *David Kemp
*Sent:* Tuesday, 27 July, 2021 21:39
*To:* SPDX-list <Spdx-tech@...>
*Subject:* [spdx-tech] GraphViz, PlantUML, and IdStrings
We discussed GraphViz and PlantUML today; here is the GraphViz version of the SPDX 2.2 information model (level of detail: conceptual).  You can paste it into any number of tools, I like <> (not because it has a sketchy mode, but because the UI feels friendliest to me.)
As you can see, it does it's own layout. This is convenient and often provides valuable insight, but isn't what a true artist like William would put into a model diagram 😁.  Artists need layout control, so a format like <> (the new name for <>) that gives that control is required.
Also look at the content of the GraphViz file.  The IdStrings are simple numbers n0-n37, each node ID is accompanied by hints ([label="xyz"]), and the hints can be deleted without destroying the graph.
The graph will be laid out the same with or without the labels/hints, and most importantly, n3 without a hint is the same node as n3 with a hint.  IdStrings should have this same property - hints do not affect equality.
# title: SPDX v2.2 Information Model
# package: <>
# license: CC0-1.0
# namespaces: {'ll': ' <>'}
# exports: ['Document']
digraph G {
  graph [fontname=Times, fontsize=12];
  node [fontname=Arial, fontsize=8, shape=box, style=filled, fillcolor=lightskyblue1];
  edge [fontname=Arial, fontsize=7, arrowsize=0.5, labelangle=45.0, labeldistance=0.9];
  n0 [label="Document"]
    n0 -> n1 [label="externalDocumentRefs", headlabel="0..*", taillabel="1"]
    n0 -> n2 [label="creationInfo", headlabel="1", taillabel="1"]
    n0 -> n3 [label="packages", headlabel="0..*", taillabel="1"]
    n0 -> n4 [label="files", headlabel="1..*", taillabel="1"]
    n0 -> n5 [label="snippets", headlabel="0..*", taillabel="1"]
    n0 -> n36 [label="hasExtractedLicensingInfos", headlabel="0..*", taillabel="1"]
    n0 -> n6 [label="relationships", headlabel="0..*", taillabel="1"]
    n0 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
  n1 [label="External\nDocument\nRef"]
    n1 -> n26 [label="checksum", headlabel="1", taillabel="1"]
  n2 [label="Creation\nInfo"]
  n3 [label="Package\nInfo"]
    n3 -> n25 [label="packageVerificationCode", headlabel="0..1", taillabel="1"]
    n3 -> n26 [label="checksums", headlabel="0..*", taillabel="1"]
    n3 -> n28 [label="externalRefs", headlabel="0..*", taillabel="1"]
    n3 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
  n4 [label="File\nInfo"]
    n4 -> n26 [label="checksums", headlabel="0..*", taillabel="1"]
    n4 -> n28 [label="externalRefs", headlabel="0..*", taillabel="1"]
    n4 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
    n4 -> n35 [label="artifactOf", headlabel="0..*", taillabel="1"]
  n5 [label="Snippet\nInfo"]
    n5 -> n33 [label="ranges", headlabel="1..*", taillabel="1"]
    n5 -> n7 [label="annotations", headlabel="0..*", taillabel="1"]
  n6 [label="Relationship"]
  n7 [label="Annotation"]
  n23 [label="Entity\nAlternate"]
  n25 [label="Package\nVerification\nCode"]
  n26 [label="Checksum"]
  n27 [label="Checksum\nAlternate"]
  n28 [label="External\nRef"]
  n33 [label="Range"]
    n33 -> n34 [label="startPointer", headlabel="1", taillabel="1"]
    n33 -> n34 [label="endPointer", headlabel="1", taillabel="1"]
  n34 [label="Range\nPointer"]
  n35 [label="Artifact"]
  n36 [label="Extra\nLicensing\nInfo"]
  n37 [label="Cross\nRef"]
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, <>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Join { to automatically receive all group messages.