Skip to content

Commit

Permalink
Move all header files into a sparta directory
Browse files Browse the repository at this point in the history
Summary:
All sparta header files are currently in the root of the include directory.
It is usually recommended to have all the header files of a library under a single directory (e.g, `boost/`, `fmt/`, etc.).
This avoids name conflicts in the root.

Let's move all header files under a `sparta` directory.

Reviewed By: arnaudvenet

Differential Revision: D47903172

fbshipit-source-id: 5542009aaa72f57b527b4b5daeddeee525275f7e
  • Loading branch information
arthaud authored and facebook-github-bot committed Aug 2, 2023
1 parent 9191e87 commit 95737fb
Show file tree
Hide file tree
Showing 57 changed files with 99 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <type_traits>
#include <utility>

#include "Exceptions.h"
#include <sparta/Exceptions.h>

namespace sparta {
namespace ad_impl {
Expand Down
2 changes: 1 addition & 1 deletion include/Analyzer.h → include/sparta/Analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <unordered_map>
#include <vector>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <boost/intrusive/pointer_plus_bits.hpp>
#include <boost/optional.hpp>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <tuple>
#include <type_traits>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

// Forward declarations.
namespace sparta {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <sstream>
#include <type_traits>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

// Forward declarations.
namespace sparta {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <boost/integer.hpp>
#include <boost/multiprecision/cpp_int.hpp>

#include "AbstractDomain.h"
#include "Exceptions.h"
#include <sparta/AbstractDomain.h>
#include <sparta/Exceptions.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#pragma once

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {

Expand Down
2 changes: 1 addition & 1 deletion include/FlatSet.h → include/sparta/FlatSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <ostream>
#include <vector>

#include "PatriciaTreeUtil.h"
#include <sparta/PatriciaTreeUtil.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <unordered_map>
#include <utility>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <unordered_map>
#include <utility>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <memory>
#include <unordered_set>

#include "PowersetAbstractDomain.h"
#include <sparta/PowersetAbstractDomain.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <limits>
#include <ostream>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {

Expand Down
4 changes: 2 additions & 2 deletions include/LiftedDomain.h → include/sparta/LiftedDomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <ostream>
#include <type_traits>

#include "AbstractDomain.h"
#include "Exceptions.h"
#include <sparta/AbstractDomain.h>
#include <sparta/Exceptions.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#include <unordered_map>
#include <vector>

#include "AbstractDomain.h"
#include "FixpointIterator.h"
#include "SpartaWorkQueue.h"
#include "WeakPartialOrdering.h"
#include "WeakTopologicalOrdering.h"
#include <sparta/AbstractDomain.h>
#include <sparta/FixpointIterator.h>
#include <sparta/SpartaWorkQueue.h>
#include <sparta/WeakPartialOrdering.h>
#include <sparta/WeakTopologicalOrdering.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <boost/intrusive_ptr.hpp>
#include <boost/optional.hpp>

#include "AbstractDomain.h"
#include "Exceptions.h"
#include "PatriciaTreeUtil.h"
#include <sparta/AbstractDomain.h>
#include <sparta/Exceptions.h>
#include <sparta/PatriciaTreeUtil.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#include <boost/optional.hpp>

#include "Exceptions.h"
#include "PatriciaTreeCore.h"
#include "PatriciaTreeUtil.h"
#include <sparta/Exceptions.h>
#include <sparta/PatriciaTreeCore.h>
#include <sparta/PatriciaTreeUtil.h>

// Forward declarations
namespace sparta {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <unordered_map>
#include <utility>

#include "AbstractDomain.h"
#include "PatriciaTreeMap.h"
#include <sparta/AbstractDomain.h>
#include <sparta/PatriciaTreeMap.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <ostream>
#include <utility>

#include "AbstractDomain.h"
#include "PatriciaTreeMap.h"
#include <sparta/AbstractDomain.h>
#include <sparta/PatriciaTreeMap.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include <initializer_list>

#include "AbstractDomain.h"
#include "Exceptions.h"
#include "PatriciaTreeSet.h"
#include <sparta/AbstractDomain.h>
#include <sparta/Exceptions.h>
#include <sparta/PatriciaTreeSet.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include <type_traits>
#include <utility>

#include "Exceptions.h"
#include "PatriciaTreeCore.h"
#include "PatriciaTreeUtil.h"
#include <sparta/Exceptions.h>
#include <sparta/PatriciaTreeCore.h>
#include <sparta/PatriciaTreeUtil.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <initializer_list>
#include <unordered_set>

#include "PatriciaTreeSet.h"
#include "PowersetAbstractDomain.h"
#include <sparta/PatriciaTreeSet.h>
#include <sparta/PowersetAbstractDomain.h>

namespace sparta {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <sstream>
#include <type_traits>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

namespace sparta {
namespace pad_impl {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <tuple>
#include <type_traits>

#include "DirectProductAbstractDomain.h"
#include <sparta/DirectProductAbstractDomain.h>

namespace sparta {
namespace rpad_impl {
Expand Down
2 changes: 1 addition & 1 deletion include/S_Expression.h → include/sparta/S_Expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <boost/intrusive_ptr.hpp>
#include <boost/optional.hpp>

#include "Exceptions.h"
#include <sparta/Exceptions.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include <initializer_list>

#include "AbstractDomain.h"
#include "Exceptions.h"
#include "FlatSet.h"
#include <sparta/AbstractDomain.h>
#include <sparta/Exceptions.h>
#include <sparta/FlatSet.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <ostream>
#include <vector>

#include "PowersetAbstractDomain.h"
#include <sparta/PowersetAbstractDomain.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <thread>
#include <utility>

#include "Arity.h"
#include <sparta/Arity.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <utility>
#include <vector>

#include "Exceptions.h"
#include <sparta/Exceptions.h>

namespace sparta {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <unordered_map>
#include <vector>

#include "Exceptions.h"
#include <sparta/Exceptions.h>

namespace sparta {

Expand Down
2 changes: 1 addition & 1 deletion test/AbstractDomainPropertyTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <gtest/gtest.h>

#include "AbstractDomain.h"
#include <sparta/AbstractDomain.h>

/*
* Scaffold for testing that implementations of AbstractDomain satisfy various
Expand Down
6 changes: 3 additions & 3 deletions test/DirectProductAbstractDomainTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* LICENSE file in the root directory of this source tree.
*/

#include "DirectProductAbstractDomain.h"
#include <sparta/DirectProductAbstractDomain.h>
#include <sparta/FiniteAbstractDomain.h>
#include <sparta/HashedAbstractPartition.h>

#include <gtest/gtest.h>
#include <sstream>
#include <tuple>

#include "AbstractDomainPropertyTest.h"
#include "FiniteAbstractDomain.h"
#include "HashedAbstractPartition.h"

using namespace sparta;

Expand Down
4 changes: 2 additions & 2 deletions test/DisjointUnionAbstractDomainTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
// Because of the rules of argument-dependent lookup, we need to include the
// definition of operator<< for ConstantAbstractDomain before that of operator<<
// for DisjointUnionAbstractDomain.
#include "ConstantAbstractDomain.h"
#include <sparta/ConstantAbstractDomain.h>

#include "DisjointUnionAbstractDomain.h"
#include <sparta/DisjointUnionAbstractDomain.h>

#include <gtest/gtest.h>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion test/FiniteAbstractDomainTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

#include "FiniteAbstractDomain.h"
#include <sparta/FiniteAbstractDomain.h>

#include <gtest/gtest.h>
#include <sstream>
Expand Down
5 changes: 2 additions & 3 deletions test/HashedAbstractEnvironmentTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
* LICENSE file in the root directory of this source tree.
*/

#include "HashedAbstractEnvironment.h"
#include <sparta/HashedAbstractEnvironment.h>
#include <sparta/HashedSetAbstractDomain.h>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <sstream>
#include <string>

#include "HashedSetAbstractDomain.h"

using namespace sparta;

using Domain = HashedSetAbstractDomain<std::string>;
Expand Down
5 changes: 2 additions & 3 deletions test/HashedAbstractPartitionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
* LICENSE file in the root directory of this source tree.
*/

#include "HashedAbstractPartition.h"
#include <sparta/HashedAbstractPartition.h>
#include <sparta/HashedSetAbstractDomain.h>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <sstream>
#include <string>

#include "HashedSetAbstractDomain.h"

using namespace sparta;

using Domain = HashedSetAbstractDomain<std::string>;
Expand Down
2 changes: 1 addition & 1 deletion test/HashedSetAbstractDomainTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

#include "HashedSetAbstractDomain.h"
#include <sparta/HashedSetAbstractDomain.h>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
Expand Down
Loading

0 comments on commit 95737fb

Please sign in to comment.