diff options
| author | coq | 2001-05-29 16:11:18 +0000 |
|---|---|---|
| committer | coq | 2001-05-29 16:11:18 +0000 |
| commit | 982812b7e66746d588fc9dcf37da21f891cf8948 (patch) | |
| tree | df82489723d9f4db73fef36568c0abbd3cbb07bd /dev/univdot | |
| parent | e4adec22d1525a4eb0b59285dc4c8c7d41d63128 (diff) | |
Facilites pour le debogguage des univers.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1772 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'dev/univdot')
| -rwxr-xr-x | dev/univdot | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/dev/univdot b/dev/univdot new file mode 100755 index 0000000000..bb0dd2c89b --- /dev/null +++ b/dev/univdot @@ -0,0 +1,49 @@ +#!/bin/sh + +usage() { + echo "" + echo "usage: univdot [INPUT] [OUTPUT]" + echo "" + echo "takes the output of Dump Universes \"file\" command" + echo "and transforms it to the dot format" + echo "" + echo "Coq> Dump Universes \"univ.raw\"." + echo "" + echo "user@host> univdot univ.raw | dot -Tps > univ.ps" + echo "" +} + + +# these are dot edge attributes to draw arrows corresponding +# to > >= and = edges of the universe graph + +GT="[color=red]" +GE="[color=blue]" +EQ="[color=black]" + + +# input/output redirection +case $# in + 0) ;; + 1) case $1 in + -h|-help|--help) usage + exit 0 ;; + *) exec < $1 ;; + esac ;; + 2) exec < $1 > $2 ;; + *) usage + exit 0;; +esac + + +# dot header +echo 'digraph G {\ + size="7.5,10" ;\ + rankdir = TB ;' + +sed -e "s/^\([^ =>]\+\) > \([^ =>]\+\)/\1 -> \2 $GT/" \ + -e "s/^\([^ =>]\+\) >= \([^ =>]\+\)/\1 -> \2 $GE/" \ + -e "s/^\([^ =>]\+\) = \([^ =>]\+\)/\1 -> \2 $EQ/" \ +| sed -e "s/\./_/g" + +echo "}"
\ No newline at end of file |
