53 "Utility for extracting I/O information from UPPAAL system spec.\n" 54 "Usage:\n " << binary <<
" [-bxrce -f format -i iofile] model.xml\n" 56 " -b use old (v. <=3.4) syntax for system specification;\n" 57 " -d calculate distances from needles rather than partition;\n" 59 " dot: for DOT (graphviz.org) format (default),\n" 60 " tron: for UPPAAL TRON format;\n" 62 " for partitioning provide input and output channels:\n" 63 " \"input\" (chan)* \"output\" (chan)*\n" 64 " for calculating distances provide a list of needles, e.g.:\n" 65 " Process.Location1 Proc.localVariable globalVariable" 66 " -r [DOT] rank symbols instead of plain map of system;\n" 67 " -c [DOT] put channels on edges between processes;\n" 68 " -e [DOT] use entity relationship notation;\n" 69 " -v increment output verbosity level.\n";
72 int main(
int argc,
char *argv[])
74 bool old=
false, ranked=
false, erd=
false, chanEdge=
false, distances=
false;
75 int format = 2, verbosity=0;
77 const char* iofile = NULL;
79 while ((c = getopt(argc,argv,
"bcdef:hi:rxv")) != -1)
95 if (strcmp(optarg,
"dot")==0)
99 else if (strcmp(optarg,
"tron")==0)
105 cerr <<
"-f expects either 'gui' or 'dot' argument.\n";
122 cerr <<
"Unrecognized option: " << c << endl;
131 if (argc - optind != 1)
135 if (strcasecmp(
".xml", argv[optind] + strlen(argv[optind]) - 4) == 0)
141 parseXTA(argv[optind], &system, !old);
146 cerr << e.what() << endl;
152 vector<UTAP::error_t>::const_iterator it;
153 const vector<UTAP::error_t> &errors = system.
getErrors();
154 const vector<UTAP::error_t> &warns = system.
getWarnings();
156 for (it = errors.begin(); it != errors.end(); it++)
160 for (it = warns.begin(); it != warns.end(); it++)
172 cerr <<
"Partitioning is inconsistent" << endl;
190 flow->
printForDot(std::cout, ranked, erd, chanEdge);
205 flow.
printForDot(std::cout, ranked, erd, chanEdge);
Class SignalFlow is for analysing UPPAAL specifications and extracting the timed automata input/outpu...
int main(int argc, char *argv[])
int32_t parseXMLFile(const char *file, TimedAutomataSystem *system, bool newxta)
DistanceCalculator is used in TargetFirst heuristic search order of Uppaal.
virtual void printForDot(std::ostream &os, bool ranked, bool erd, bool cEdged)
Print I/O information in DOT format into given output stream.
A visitor which type checks the system it visits.
This class constructs a TimedAutomataSystem.
The ParserBuilder interface is used by the parser to output the parsed system.
const std::vector< error_t > & getErrors() const
Partitions the system into environment and IUT according to TRON assumptions.
void addProcessNeedle(const char *proc)
adds a variable needle to I/O map
int partition(const strs_t &inputs, const strs_t &outputs)
const std::vector< error_t > & getWarnings() const
Exception indicating a type error.
void printForTron(std::ostream &os)
Print I/O information in TRON format into given output stream.
void accept(SystemVisitor &)
static int32_t parseXTA(ParserBuilder *aParserBuilder, bool newxta, xta_part_t part, std::string xpath)
void printHelp(const char *binary)
void setVerbose(int verbose)