Giter Site home page Giter Site logo

Graphviz DOT output about automatalib HOT 8 CLOSED

juangamnik avatar juangamnik commented on July 3, 2024
Graphviz DOT output

from automatalib.

Comments (8)

juangamnik avatar juangamnik commented on July 3, 2024

The result looks like this:

rbt1-hyp

from automatalib.

misberner avatar misberner commented on July 3, 2024

Could you maybe explain how this is different from existing dot outputs?
The only difference I could spot is the subscript of the node id and that
some transitions are colored in red. Both aspects are somewhat specific and
can easily be achieved using your own dot helper. Or did I miss something?
On Dec 6, 2013 1:41 PM, "juangamnik" [email protected] wrote:

Since the models learnlib infers are AFAIK always some kind of automaton,
the DOT output should look like an automaton. Here is an example how this
could be realized:

digraph DFA {
node [shape=circle,width=0.35,height=0.35,fixedsize=true]
edge [arrowhead=vee]

q0 [label=<q0>];
q0 -> q1[label=AUI,penwidth=4,color=red]
q0 -> q2[label=UDI]
q1 [label=<q1>];
q1 -> q3[label=SR,penwidth=4,color=red]
q1 -> q4[label=UDI]
q2 [label=<q2>];
q2 -> q4[label=AUI]
q3 [label=<q3>];
q3 -> q5[label=UDI]
q4 [label=<q4>];
q4 -> q5[label=SR]
q5 [label=<q5>,shape=doublecircle];
}


Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.

from automatalib.

juangamnik avatar juangamnik commented on July 3, 2024

Oh the red highlighting was part of the example only, sorry. But I think the differences are remarkable ;). I'm happy with a dot helper if I can change there the necessary stuff. The differences:

  • circle shapes for states.
  • smaller shapes for states.
  • different arrowheads for edges.
  • 'q' instead of 's' in state-labels.
  • subscript state numbers.

The changes are subtle but have a great impact on the overall look of an automaton (especially the shapes of the nodes)

from automatalib.

misberner avatar misberner commented on July 3, 2024

Okay, I see your point. Some remarks:

  • 's' stands for state (naturally). It might be more common in German textbooks to prefix states using 'q', but 's' is by no means less automata-like (cf. e.g. this picture)
  • Using <sub> in HTML-like labels apparently may cause problems. Cf. the remarks in this document
  • Smaller shapes may look nicer in this example, however come with the disadvantage that the accepting state is bigger than the other states (at least to me it looks like this). I find this kind of ugly, too.
  • The arrowheads you used look in fact nicer. I still wouldn't go as far to say that the standard ones do not look like in an automaton.

My main concern is generality. Setting less options leaves more room for flexibility. For example, if I decide to use custom (more descriptive) edge labels, I will have to (know that I have to) change a) the node shape b) the fixedsize attribute. Introducing an additional DOT helper which imposes these rules at a global level should not be a problem and I can do that, but I'd rather not make it a default for the above reasons. As for the subscript, I do not want a default policy which causes error messages in many versions of GraphVIZ, even if those are non-fatal errors.
(On a side note: By default, the states simply do not have labels. "s0" etc. are just the identifiers used for the states itself.)

I can and will add respective DOT helpers. Nevertheless, if prettiness is a concern, I'd suggest you take a look at the dot2tex tool.

from automatalib.

juangamnik avatar juangamnik commented on July 3, 2024

A remark to your remarks: of course these suggestions are not the answer to everything. There are pros and cons. So I am perfectly d'accord with moving these enhancement to a DOT helper.

I can and will add respective DOT helpers. Nevertheless, if prettiness is a concern, I'd suggest you take a look at the dot2tex tool.

That's cool. I will check that out. I asked, whether someone knows something like this, but nobody knew (you weren't in your office). So thank you very much.

If you like, you can close the issue or let it open until the DOT helpers are added?!? If you tell me where I can find an example DOT helper and where to put mine, I may implement the helper, too.

from automatalib.

juangamnik avatar juangamnik commented on July 3, 2024

Unfortunately I didn't get nice output from dot2tex in a reasonable amount of time. I will have a further look into it, but first experiments led to very ugly results:

dot2tex-text

And there was a bug in the current version of ubuntu I had to fix manually ;) 0. But hey its open source.

from automatalib.

juangamnik avatar juangamnik commented on July 3, 2024

I will try to find a "good solution" and write a tutorial on my blog. You may then link it in your documentation. An easy to use and hilariously looking dot2latex template would be of interest for any computer scientist working with learnlib, hu?

from automatalib.

juangamnik avatar juangamnik commented on July 3, 2024

No good solution found so far...

from automatalib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.