Petri Nets graph image generation tool - graph-visualization

What software or tool was used to generate these high-level petri nets graph images?
I looked for many tools but could not find that one.
from https://ieeexplore.ieee.org/document/7464291
(source: springernature.com)
from https://link.springer.com/article/10.1007/s11227-013-1055-z
from https://ieeexplore.ieee.org/document/7008450

There is a petri net tools database at https://www.informatik.uni-hamburg.de/TGI/PetriNets/tools/db/cpnami.html although the link for the GUI Macao tool is broken.
I have used various GraphVis based tools for this in the past https://graphviz.gitlab.io/resources/ though I have not found one to date that is really simple to use.
Generally seems that the dot format is used for petri nets, this requires coding the network as a dot file in a text editor and use various tools to render it. https://en.wikipedia.org/wiki/DOT_(graph_description_language)
Hope that helps.

Related

Face identification and recognition without libraries

Is there any "step by step guide" on how to do a face recognition and identification without any libraries?
The goal is to receive 60 images and identify who is it in every image, so first we will have to get the info of every person and then, identify they image by image.
it's for an academic research and we are not supposed to use any kind of "external help" for our algorithmy. Any programming language will do. We just need to keep everything simple. What should i research and use to do this kind of software?
This article provides basic techniques for image recognition. It uses neural nets to recognize handwritten digits.

Does a Tool for Automatically Visualizing a Project's Source Code's Control Flow In-Line Exist?

I would like to be able to use a tool that lets you visualize a program's control flow(s) in the context of its source code. To clarify, such a tool should basically show what happens in a program by spitting out a human-readable abstract syntax tree in the form of a multidigraph with nodes containing snippets of source-code translation units. The resulting graph initial node would, I presume, contain the block of code starting with a program's entry point (that'd be main for a C or C++ program.) New nodes would be created when a node needs to reference another block of code, whether that might be in the current file or in another one, and arrows would connect the nodes. Does such a tool exist, or would it have to be created from scratch?
You aren't going to get a tool that does this for arbitrary languages off the shelf. There are too many languages, each with its own syntax and semantics. You somehow need a tool per language. You might find such tools for very commonly used languages, e.g, Understand for Software.
I think that the only way to do this is to build metatools that enable the construction of language-specific tools relatively easily. Such a tool has to have the common machinery needed by all such language processing tools: strong parsers (so writing grammars for languages is relatively straightforward), AST construction machinery, symbol table support, routines to build control and data flow graphs. By providing such machinery, one can build language front ends for modest costs.
There's a class of tools that does this, program transformation. Most of them have parsing engines, but not the rest of the mechanisms I have suggested above.
I believe this enough to have invested 20 years of my life to building
such meta tools. Our DMS Software Reengineering toolkit shows its strength in being able to parse some 50+ languages, including the stunningly hard C++14 (both MS and GNU variants). It shows symbol table support and control flow graph construction for COBOL, Java, C, C++. (We can't do everything at once; pedaling as fast as practical).
[DMS builds these graphs as data structures rather than "showing" them; the examples on that page are drawn with the additional help of DOT].
One of the few other tools that tries to do this is Clang/LLVM; this covers a wide variety of popular languages. Clang doesn't have any specific support for parsing that I know about; you get to code it all yourself. I think you get control flow graphs only after you convert the language to LLVM. I don't think it has any specific support for drawing control flow graphs, either.
An older tool with a good reputation for multi-language support in this space is CoCo/R;
I don't know a lot about it. I know it parses,
and has some support for ASTs; I don't know what it does
about control flow analysis.

Creating a Dynamic/Visual Systems Diagram from Energy Flows

I am working on a technical engineering solution of connecting systems to other systems throughout a building environment. I am attempting to create a diagram that visually shows an input energy and then flow it through a series of systems, each of which will use a portion of that energy for operation. The diagram will update with different operations based on amount of energy, time of day, location, and desired output (heating or cooling).
The problem I have is that I need an extremely visual way of laying this out in a dynamic way. This all sounds super technical but to simplify, I'm basically creating a systems operation diagram (OR workflow diagram) that needs some serious power and visualization. I hope to make this a powerful tool in which, environmental data will automatically alter the diagram's configuration.
I am comfortable with learning a programming language if necessary but I'm just not sure which will be the best. I would like to start simple with one configuration and keep implementing new parameters. I was looking at Python, JavaScript, C++, C#, and VisualBasic. I almost imagine this like a game design for aesthetics but I'm not sure.
Below is a static example of the systems diagrams created for one specific case. This example is only the diagram and lacks any interactivity. Basically I would like to make a dynamic and interactive diagram that can take inputs and alter itself. But for starters, change visually with specific button presses.
Original

Plotting GPS info with Ruby

I'm looking for ways to programmatically convert my GPS logs to images and would like to do this in Ruby... if that's an acceptable tool. I have no GIS background whatsoever but as a programmer i think it's an interesting problem to look at.
Here is what I have come up with so far. First you'll need some kind of graphing library. I went for gnuplot as I found a Ruby binding for that one but R seems hot these days. I created a small script that converts a GPX file and feeds the data to gnuplot resulting in something like this: alt text http://dl.dropbox.com/u/45672/gpslog.png
This looks fine but gnuplot seems really a tool to create graphs, not spatial data. Is this the way to do it or are there much better solutions available?
Here is another example, any idea how you build stuff like this?
Answer to First Question
Since you stated that you "would like to do this in Ruby...if that's an acceptable tool", I'll go out on a limb and assume that you might be open to a non-Ruby solution if it meets all of your other requirements.
I would recommend Python primarily because in the first chapter of Beginning Python Visualization, Shai Vaingast—the author—goes through an example of reading in GPS data from a GPS receiver and then plots the results. If you're open to a Python-based solution, this book would be a great resource.
Here are the Python packages that are used to read and plot the GPS data:
pySerial to read the GPS data in from the serial port
matplotlib to plot the data. "matplotlib is a library for making 2D plots of arrays in Python. Although it has its origins in emulating the MATLAB® graphics commands, it is independent of MATLAB, and can be used in a Pythonic, object oriented way."
Here's an example figure created by Shai Vaingast showing off a few of the different capabilities of matplotlib for plotting GPS data.
If you are not open to a Python solution, and would prefer Ruby—for whatever reason—I understand. I tried to search for an equivalent of matplotlib in Ruby, but I didn't find an equivalent package.
Answer to Last Question
Here is another example, any idea how you build stuff like this?
Looking at the lower, right-hand corner, it appears that DISLIN was used to create that image. While DISLIN is available for quite a few programming languages, the DISLIN software requirements page does not show that Ruby is supported.
According to the DISLIN website,
DISLIN is a high-level plotting library for displaying data as curves, polar plots, bar graphs, pie charts, 3D-color plots, surfaces, contours and maps.
The software is available for several C, Fortran 77 and Fortran 90/95 compilers on the operating systems UNIX, Linux, FreeBSD, OpenVMS, Windows, Mac OSX and MS-DOS. DISLIN programs are very system-independent, they can be ported from one operating system to another without any changes.
For some operating systems, the programming languages Perl, Python, Java and the C/C++ interpreter Ch are also supported by DISLIN. The DISLIN interpreter DISGCL is availble for all supported operating systems. See a complete list of the supported operating systems and compilers.
Do you really want images, or just a way to visualize the data? How about using the google maps api?
Check out this link:
http://google-dox.net/O.Reilly-Google.Maps.Hacks/0596101619/googlemapshks-CHP-4-SECT-10.html
I think that using gnuplot from any programming language is a good starting approach.
However, I strongly suggest adding the set size ratio -1 gnuplot command somewhere in your code, as this will make the x and y axis scales equal in the plot, which is extremely important.
You could also augment the line with very small point markers equally spaced in time (assuming you have time information in your data, or at least you know that rows are sampled at regular time intervals), so you get a feel of the speed of the movement, which is otherwise lost (i.e., large-spaced point markers on the line mean faster movement). Obviously you should pick a time interval between point markers that makes them appropriately spaced, or compute such time interval automatically: i.e. by computing the length of your curve, converting it in pixel units, and dividing by anything between 10 and 100, to get the total number of points you want to place. The time interval is then given by the total time of the track divided by such number of points. This should work robustly for reasonably regular movements.
Another option is to use a different charting system than gnuplot, which is powerful but a bit old. Options known to me include:
gruff, which is for ruby but seems to miss 2D plotting abilities (which is an obvious requirement).
XML/SWF Charts, which is powerful and flexible, but commercial. In this case, you would use ruby or any other programming language to generate an XML file which then gets interpreted to an interactive graph.
Google Chart API, which can return chart images over the web, forging an appropriate GET or POST request in your code. In this case, you are intersted in the lxy chart type, possibly compounded with a scatter chart for the point markers.
The third option seems the most fun.
GDAL is very popular Open Source GIS kit, there are GDAL Ruby bindings. If you want map data, open street map is very useful. Combined plotting of OSM and the GPS will give pretty nice results. GDAL/OGR Api tutorial is here.
If you want to look more into R, there are Ruby bindings for that too, but there has been no activity on the project for over a year:
http://github.com/alexgutteridge/rsruby
Maybe you have heard of Processing already but have you heard of Ruby-Processing ?
From the Ruby-Processing readme:
Ruby-Processing is a Ruby wrapper for the Processing code art framework.
…
If some quality time with Ruby is your
idea of a pleasant afternoon, or you
harbor ambitions of entering the
fast-paced and not altogether
cutthroat world of Code Art, then
Ruby-Processing is probably something
you should try on for size.
…
Processing is an MIT-developed
framework for making little code
artifacts, animations,
visualizations, and the like,
developed originally by Ben Fry and
Casey Reas, supported by a small army
of open-source contributors.
Processing has become a sort of
standard for visually-oriented
programming, strongly influencing
the designs of Nodebox, Shoes,
Arduino, and other kindred projects

Profiling visualization tools?

I need to display profiling information pulled from a deeply embedded CPU, presenting it in a way which other developers on my team will be able to act upon. The profiling data is a snapshot of a cycle counter at the entry and exit of every function, so we have a call graph annotated with sub-microsecond timing accuracy. I'd prefer not to just dump out function names and timing like gprof, I'm looking for something easier to understand and act upon.
Has anyone worked with a particularly good profiling tool (on any platform), which made it easy to identify areas of the code to drill into? I'm looking for an inspirational example to follow for how to display the call graph, but if there is good tool with an input format I can massage my data to I'll use it. I could use Windows, Linux, or MacOS X to run the visualization tool.
A profiling article on IBM DeveloperWorks led me to GraphViz, with a profiling example on their site. Barring another suggestion here, I'll use GraphViz and mimic their profiling example.
Another neat tool to visualize profiling data is the gprof2dot.py python script.
It can be used to visualize several different formats: "This is a Python script to convert the output from prof, gprof, oprofile, Shark, AQtime, and python profilers into a dot graph." This is what the output look like:
(source: googlecode.com)
I use Kprof
http://kprof.sourceforge.net/
it is old, but I never found a better tool to inspect the results from gprof.
How about "GTKWave"?
But you have to insert the probe in your code.
Valgrind does profiling (and more), and there are GUIs for visualization.
I suggest you drop gprof+graphviz for OProfileUI, unless you don't have a choice.
JetBrains dotTrace (has a trial demo you can play with). It organizes the call stacks and can easily find the trouble spots. Has a lot of filtering capabilities as well. Very easy to navigate and find what you're looking for.
IE 8b2 offers a simple display of the call tree for javascript that I believe is much more useful than the GraphViz chart.
The GraphViz chart is wonderful for visualizing the call tree but makes it very difficult to visualize timing issues (IMHO the more important data).
**Edit: I thought it is worth pointing out that all of the tools suggested use a grid based tree to visualize the call tree. This allows you to see the calling structure without downplaying the timing data as I believe you do with the GraphViz chart.*
You can use Senseo, a plugin for Eclipse. It shows you the performance, memory allocation, objects created, time spent, actual methods invoked, hover over method signatures or calls, call context tree, package explorer and more.
I've written a browser-based visualization tool, profile_eye, which operates on the output of gprof2dot.
gprof2dot is great at grokking many profiling-tool outputs, and does a great job at graph-element placement. The final rendering is a static graphic, which is often very cluttered.
Using d3.js it's possible to remove much of that clutter, through relative fading of unfocused elements, tooltips, and a fisheye distortion.
For comparison, see profile_eye's visualization of the canonical example used by gprof2dot.

Resources