1#ifndef ROSE_BinaryAnalysis_ModelChecker_SourceLister_H
2#define ROSE_BinaryAnalysis_ModelChecker_SourceLister_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
6#include <Rose/BinaryAnalysis/ModelChecker/BasicTypes.h>
7#include <Rose/SourceLocation.h>
9#include <Sawyer/LineVector.h>
11#include <boost/filesystem.hpp>
12#include <boost/format.hpp>
15namespace BinaryAnalysis {
16namespace ModelChecker {
23 using Ptr = SourceListerPtr;
26 std::vector<boost::filesystem::path> directories;
27 boost::format currentLineFormat{
"| ==> %06d %s"};
28 boost::format contextLineFormat{
"| %06d %s"};
29 size_t leadingContext = 3;
30 size_t trailingContext = 3;
34 mutable SAWYER_THREAD_TRAITS::Mutex mutex_;
40 explicit SourceLister(
const Settings&);
51 static Ptr instance();
52 static Ptr instance(
const Settings&);
63 boost::format currentLineFormat()
const;
64 void currentLineFormat(
const boost::format&);
75 boost::format contextLineFormat()
const;
76 void contextLineFormat(
const boost::format&);
87 size_t leadingContext()
const;
88 void leadingContext(
size_t);
99 size_t trailingContext()
const;
100 void trailingContext(
size_t);
111 std::vector<boost::filesystem::path> directories()
const;
112 void directories(
const std::vector<boost::filesystem::path>&);
121 void appendDirectory(
const boost::filesystem::path&);
130 bool list(std::ostream&,
const SourceLocation&,
const std::string &prefix);
138 static std::vector<boost::filesystem::path> decompose(
const boost::filesystem::path&);
142 static boost::filesystem::path findFile(
const boost::filesystem::path &dir,
const std::vector<boost::filesystem::path> &names);
Container associating values with keys.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.