Comments (8)
The result looks like this:
from automatalib.
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.
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.
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.
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.
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:
And there was a bug in the current version of ubuntu I had to fix manually ;) 0. But hey its open source.
from automatalib.
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.
No good solution found so far...
from automatalib.
Related Issues (20)
- CompactMealyTransition does not extend MealyTransition HOT 5
- Error testing serilaization-dot HOT 10
- Substract current automaton size to Wp-method's maxDepth HOT 2
- Replace JSR305 annotations
- Write a parser for LTSmin formulae
- Incorrect characterizing set for Mealy machine HOT 3
- TAF writer does not enquote outputs of mealy machines
- DOTParsers.mealy() not parsing all transitions HOT 13
- Minimizer.minimize overload without start states is broken HOT 2
- CompactMoore HOT 9
- Deviation in the BBC functionality between (at least) LearnLib 0.14.0 and 0.16.0 HOT 2
- PaigeTarjanMinimization.minimizeDFA does not guarantee minimal result HOT 2
- Add support for Java 17 (LTS) to CI pipeline
- AUTParser only adds states with outgoing transitions
- How to minimize a chained mealy automata HOT 10
- M3C does not run on M1 MacBooks HOT 1
- Fail on javadoc warnings and improve documentation
- M3CParser fails when ID is a formula token
- IndexOutOfBoundsException in IncrementalMealyDAGBuilder when input word is longer than output word HOT 6
- IncrementalDAGBuilder fails for traces with cyclic repetitions longer than 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from automatalib.