diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-12-14 22:15:57 +0000 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2024-01-12 12:00:35 +0000 |
commit | 2c8b74cc858793c94e5476b5765e93ee23738702 (patch) | |
tree | 8d4005084ef0ae0f2d7eb72333855e15526ace25 /tools/klee-ptree/main.cpp | |
parent | 5ca8f5a020cca251a0d5d08bc855bf945735c1af (diff) | |
download | klee-2c8b74cc858793c94e5476b5765e93ee23738702.tar.gz |
Rename files from PTree to ExecutionTree (and similar)
Diffstat (limited to 'tools/klee-ptree/main.cpp')
-rw-r--r-- | tools/klee-ptree/main.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/tools/klee-ptree/main.cpp b/tools/klee-ptree/main.cpp deleted file mode 100644 index 96d2be75..00000000 --- a/tools/klee-ptree/main.cpp +++ /dev/null @@ -1,68 +0,0 @@ -//===-- main.cpp ------------------------------------------------*- C++ -*-===// -// -// The KLEE Symbolic Virtual Machine -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include <cstdlib> -#include <filesystem> -#include <iostream> - -#include "Printers.h" - -namespace fs = std::filesystem; - -void print_usage() { - std::cout << "Usage: klee-ptree <option> /path[/ptree.db]\n\n" - "Options:\n" - "\tbranches - print branch statistics in csv format\n" - "\tdepths - print depths statistics in csv format\n" - "\tinstructions - print asm line summary in csv format\n" - "\tterminations - print termination statistics in csv format\n" - "\ttree-dot - print tree in dot format\n" - "\ttree-info - print tree statistics" - "\n"; -} - -int main(int argc, char *argv[]) { - if (argc != 3) { - print_usage(); - exit(EXIT_FAILURE); - } - - // parse options - void (*action)(const Tree &); - std::string option(argv[1]); - if (option == "branches") { - action = printBranches; - } else if (option == "instructions") { - action = printInstructions; - } else if (option == "depths") { - action = printDepths; - } else if (option == "terminations") { - action = printTerminations; - } else if (option == "tree-dot") { - action = printDOT; - } else if (option == "tree-info") { - action = printTreeInfo; - } else { - print_usage(); - exit(EXIT_FAILURE); - } - - // create tree - fs::path path{argv[2]}; - if (fs::is_directory(path)) - path /= "ptree.db"; - if (!fs::exists(path)) { - std::cerr << "Cannot open " << path << '\n'; - exit(EXIT_FAILURE); - } - Tree tree(path); - - // print results - action(tree); -} |