Use fullpath in #include directives, add missing STL headers

This commit is contained in:
Soonho Kong 2013-09-13 03:35:29 -07:00
parent e992ded245
commit 5c3866cd71
71 changed files with 128 additions and 79 deletions

View file

@ -5,6 +5,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <deque>
#include <limits>
#include <utility>
#include <vector>
#include "util/flet.h"
#include "kernel/normalizer.h"
#include "kernel/context.h"

View file

@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <vector>
#include "frontends/lean/elaborator_exception.h"
#include "frontends/lean/elaborator.h"

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <vector>
#include "kernel/kernel_exception.h"
#include "library/state.h"
#include "frontends/lean/elaborator.h"

View file

@ -6,6 +6,10 @@ Author: Leonardo de Moura
*/
#include <atomic>
#include <unordered_set>
#include <vector>
#include <utility>
#include <functional>
#include "util/map.h"
#include "util/sstream.h"
#include "util/exception.h"

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <algorithm>
#include "util/name.h"
#include "util/list.h"
#include "util/sexpr/format.h"

View file

@ -4,7 +4,17 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#ifdef LEAN_USE_READLINE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
#endif
#include <unordered_map>
#include <utility>
#include <string>
#include <vector>
#include "util/scoped_map.h"
#include "util/exception.h"
#include "util/sstream.h"
@ -27,13 +37,6 @@ Author: Leonardo de Moura
#include "frontends/lean/scanner.h"
#include "frontends/lean/notation.h"
#include "frontends/lean/pp.h"
#ifdef LEAN_USE_READLINE
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
#endif
#ifndef LEAN_DEFAULT_PARSER_SHOW_ERRORS
#define LEAN_DEFAULT_PARSER_SHOW_ERRORS true

View file

@ -6,6 +6,8 @@ Author: Leonardo de Moura
*/
#include <limits>
#include <memory>
#include <utility>
#include <vector>
#include "util/scoped_map.h"
#include "util/exception.h"
#include "util/scoped_set.h"

View file

@ -7,6 +7,7 @@ Author: Leonardo de Moura
#pragma once
#include <iostream>
#include <vector>
#include <string>
#include "util/name.h"
#include "util/list.h"
#include "util/numerics/mpq.h"

View file

@ -9,6 +9,7 @@ Author: Leonardo de Moura
#include <gmp.h>
#include <mpfr.h>
#include <utility>
#include <algorithm>
#include "util/trace.h"
#include "util/numerics/mpz.h"
#include "interval/interval.h"

View file

@ -5,9 +5,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <algorithm>
#include "abstract.h"
#include "free_vars.h"
#include "replace.h"
#include <utility>
#include "kernel/abstract.h"
#include "kernel/free_vars.h"
#include "kernel/replace.h"
namespace lean {
expr abstract(expr const & e, unsigned n, expr const * s) {

View file

@ -5,7 +5,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "expr.h"
#include <utility>
#include "kernel/expr.h"
namespace lean {
/**

View file

@ -4,9 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "builtin.h"
#include "environment.h"
#include "abstract.h"
#include "kernel/builtin.h"
#include "kernel/environment.h"
#include "kernel/abstract.h"
#ifndef LEAN_DEFAULT_LEVEL_SEPARATION
#define LEAN_DEFAULT_LEVEL_SEPARATION 512

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "expr.h"
#include "kernel/expr.h"
namespace lean {
/**

View file

@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <utility>
#include "util/exception.h"
#include "kernel/context.h"

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <utility>
#include "util/list.h"
#include "kernel/expr.h"

View file

@ -7,9 +7,9 @@ Author: Leonardo de Moura
#pragma once
#include <iostream>
#include <memory>
#include "context.h"
#include "object.h"
#include "level.h"
#include "kernel/context.h"
#include "kernel/object.h"
#include "kernel/level.h"
namespace lean {
/**

View file

@ -8,6 +8,7 @@ Author: Leonardo de Moura
#include <iostream>
#include <limits>
#include <atomic>
#include <utility>
#include "util/rc.h"
#include "util/name.h"
#include "util/hash.h"

View file

@ -6,7 +6,7 @@ Author: Leonardo de Moura
*/
#pragma once
#include <unordered_map>
#include "expr.h"
#include "kernel/expr.h"
namespace lean {

View file

@ -6,6 +6,7 @@ Author: Leonardo de Moura
*/
#pragma once
#include <unordered_set>
#include <utility>
#include "util/hash.h"
#include "kernel/expr.h"

View file

@ -5,8 +5,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "expr.h"
#include "expr_sets.h"
#include "kernel/expr.h"
#include "kernel/expr_sets.h"
namespace lean {
template<typename F>

View file

@ -5,9 +5,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <algorithm>
#include "free_vars.h"
#include "expr_sets.h"
#include "replace.h"
#include "kernel/free_vars.h"
#include "kernel/expr_sets.h"
#include "kernel/replace.h"
namespace lean {

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "expr.h"
#include "kernel/expr.h"
namespace lean {
/**
\brief Return true iff the given expression has free variables.

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "expr.h"
#include "kernel/expr.h"
namespace lean {
/**

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <vector>
#include "util/exception.h"
#include "kernel/context.h"
#include "kernel/environment.h"

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <algorithm>
#include <limits>
#include "util/scoped_map.h"
#include "util/list.h"
#include "util/flet.h"

View file

@ -6,9 +6,9 @@ Author: Leonardo de Moura
*/
#pragma once
#include <memory>
#include "expr.h"
#include "environment.h"
#include "context.h"
#include "kernel/expr.h"
#include "kernel/environment.h"
#include "kernel/context.h"
namespace lean {
class environment;

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <algorithm>
#include "util/rc.h"
#include "kernel/expr.h"
/*

View file

@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "occurs.h"
#include "for_each.h"
#include "kernel/occurs.h"
#include "kernel/for_each.h"
namespace lean {
template<typename F>

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "context.h"
#include "kernel/context.h"
namespace lean {
/** \brief Return true iff \c n occurs in \c m */

View file

@ -6,8 +6,8 @@ Author: Leonardo de Moura
*/
#pragma once
#include <memory>
#include "expr.h"
#include "context.h"
#include "kernel/expr.h"
#include "kernel/context.h"
namespace lean {
class environment;

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "expr.h"
#include "kernel/expr.h"
namespace lean {
// Some value subclasses that capture common implementation patterns.

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <utility>
#include "util/hash.h"
#include "kernel/expr.h"

View file

@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <vector>
#include "library/kernel_exception_formatter.h"
namespace lean {

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <algorithm>
#include <utility>
#include "util/exception.h"
#include "library/printer.h"
#include "library/metavar.h"

View file

@ -6,6 +6,7 @@ Author: Leonardo de Moura
*/
#pragma once
#include <iostream>
#include <utility>
#include "kernel/expr.h"
#include "kernel/context.h"

View file

@ -1,3 +1,5 @@
#include <string>
using std::cout;
using std::endl;

View file

@ -7,7 +7,7 @@ Author: Leonardo de Moura
#pragma once
#include <algorithm>
#include <cstring>
#include "debug.h"
#include "util/debug.h"
namespace lean {
/**

View file

@ -4,18 +4,17 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "debug.h"
#include <iostream>
#include <sstream>
#include <set>
#include <string>
#include <memory>
#include <cstdlib>
#ifndef _WINDOWS
// Support for pid
#include<unistd.h>
#endif
#include "util/debug.h"
namespace lean {
static volatile bool g_has_violations = false;

View file

@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "escaped.h"
#include "util/escaped.h"
namespace lean {

View file

@ -5,8 +5,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <sstream>
#include "exception.h"
#include "sstream.h"
#include <string>
#include "util/exception.h"
#include "util/sstream.h"
namespace lean {

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "debug.h"
#include "util/debug.h"
namespace lean {

View file

@ -7,8 +7,8 @@ Author: Leonardo de Moura
#pragma once
#include <iostream>
#include <iterator>
#include "rc.h"
#include "debug.h"
#include "util/rc.h"
#include "util/debug.h"
namespace lean {
/**

View file

@ -5,9 +5,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "list.h"
#include "buffer.h"
#include "pair.h"
#include <utility>
#include "util/list.h"
#include "util/buffer.h"
#include "util/pair.h"
namespace lean {
/**

View file

@ -8,13 +8,14 @@ Author: Leonardo de Moura
#include <vector>
#include <algorithm>
#include <sstream>
#include "name.h"
#include "debug.h"
#include "rc.h"
#include "buffer.h"
#include "hash.h"
#include "trace.h"
#include "ascii.h"
#include <string>
#include "util/name.h"
#include "util/debug.h"
#include "util/rc.h"
#include "util/buffer.h"
#include "util/hash.h"
#include "util/trace.h"
#include "util/ascii.h"
namespace lean {
constexpr char const * anonymous_str = "[anonymous]";

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <string>
#include <iostream>
namespace lean {

View file

@ -6,7 +6,7 @@ Author: Leonardo de Moura
*/
#pragma once
#include <unordered_set>
#include "name.h"
#include "util/name.h"
namespace lean {
typedef std::unordered_set<name, name_hash, name_eq> name_set;
}

View file

@ -4,9 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Soonho Kong
*/
#include <cmath>
#include "util/numerics/numeric_traits.h"
#include "util/numerics/double.h"
#include <cmath>
namespace lean {

View file

@ -4,9 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Soonho Kong
*/
#include <cmath>
#include "util/numerics/numeric_traits.h"
#include "util/numerics/float.h"
#include <cmath>
namespace lean {

View file

@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <new>
#include <gmp.h>
#include <new>
#include <cstdlib>
extern "C" void * cxx_malloc(size_t size) {

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Soonho Kong
*/
#include <cmath>
#include <string>
#include "util/numerics/mpfp.h"
namespace lean {

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <memory>
#include "mpz.h"
#include "util/numerics/mpz.h"
namespace lean {

View file

@ -5,8 +5,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <iostream>
#include <gmp.h>
#include <iostream>
#include "util/debug.h"
#include "util/numerics/numeric_traits.h"

View file

@ -7,7 +7,7 @@ Author: Leonardo de Moura
*/
#include <cfenv>
#include <cmath>
#include "numeric_traits.h"
#include "util/numerics/numeric_traits.h"
namespace lean {

View file

@ -8,6 +8,7 @@ Author: Leonardo de Moura
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
namespace lean {
/**

View file

@ -5,9 +5,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <iostream>
#include <deque>
#include "rc.h"
#include <iostream>
#include "util/rc.h"
#ifndef LEAN_PDEQUE_MIN_QUOTA
#define LEAN_PDEQUE_MIN_QUOTA 16

View file

@ -7,7 +7,7 @@ Author: Leonardo de Moura
#pragma once
#include <iostream>
#include <vector>
#include "rc.h"
#include "util/rc.h"
#ifndef LEAN_PVECTOR_MIN_QUOTA
#define LEAN_PVECTOR_MIN_QUOTA 16

View file

@ -7,9 +7,6 @@ Author: Leonardo de Moura
#pragma once
// Goodies for reference counting
#include "debug.h"
#ifdef LEAN_THREAD_UNSAFE_REF_COUNT
#define MK_LEAN_RC() \
private: \
@ -30,6 +27,7 @@ void inc_ref() { std::atomic_fetch_add_explicit(&m_rc, 1u, std::memory_order_rel
bool dec_ref_core() { lean_assert(get_rc() > 0); return std::atomic_fetch_sub_explicit(&m_rc, 1u, std::memory_order_relaxed) == 1u; } \
void dec_ref() { if (dec_ref_core()) dealloc(); }
#endif
#include "util/debug.h"
#define LEAN_COPY_REF(T, Arg) \
if (Arg.m_ptr) \

View file

@ -5,7 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <limits>
#include "exception.h"
#include "util/exception.h"
namespace lean {
void check_int_overflow(long long n) {

View file

@ -8,7 +8,9 @@ Author: Leonardo de Moura
#include <iostream>
#include <unordered_map>
#include <vector>
#include "debug.h"
#include <utility>
#include <functional>
#include "util/debug.h"
#ifndef LEAN_SCOPED_MAP_INITIAL_BUCKET_SIZE
#define LEAN_SCOPED_MAP_INITIAL_BUCKET_SIZE 8

View file

@ -7,7 +7,9 @@ Author: Leonardo de Moura
#pragma once
#include <unordered_set>
#include <vector>
#include "debug.h"
#include <utility>
#include <functional>
#include "util/debug.h"
#ifndef LEAN_SCOPED_SET_INITIAL_BUCKET_SIZE
#define LEAN_SCOPED_SET_INITIAL_BUCKET_SIZE 8

View file

@ -5,6 +5,8 @@
Author: Soonho Kong
*/
#include <sstream>
#include <string>
#include <utility>
#include "util/escaped.h"
#include "util/sexpr/sexpr.h"
#include "util/sexpr/format.h"
@ -365,7 +367,7 @@ format operator+(format const & f1, format const & f2) {
}
format operator^(format const & f1, format const & f2) {
return format{f1, format(" "), f2};
return format {f1, format(" "), f2};
}
std::ostream & pretty(std::ostream & out, unsigned w, bool colors, format const & f) {

View file

@ -9,6 +9,8 @@ Author: Soonho Kong
#include <iostream>
#include <numeric>
#include <sstream>
#include <utility>
#include <string>
#include "util/pair.h"
#include "util/debug.h"
#include "util/numerics/mpz.h"

View file

@ -5,9 +5,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <memory>
#include "options.h"
#include "option_declarations.h"
#include "sexpr_fn.h"
#include <string>
#include "util/sexpr/options.h"
#include "util/sexpr/option_declarations.h"
#include "util/sexpr/sexpr_fn.h"
namespace lean {
std::ostream & operator<<(std::ostream & out, option_kind k) {

View file

@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <cstring>
#include <string>
#include "util/rc.h"
#include "util/hash.h"
#include "util/name.h"

View file

@ -6,6 +6,8 @@ Author: Leonardo de Moura
*/
#pragma once
#include <iostream>
#include <string>
#include <algorithm>
namespace lean {
class name;

View file

@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "sexpr_fn.h"
#include "util/sexpr/sexpr_fn.h"
namespace lean {

View file

@ -6,6 +6,7 @@ Author: Leonardo de Moura
*/
#pragma once
#include <sstream>
#include <string>
namespace lean {
/** \brief Wrapper for std::ostringstream */

View file

@ -9,4 +9,4 @@ Author: Leonardo de Moura
#ifndef LEAN_DEBUG
#define LEAN_DEBUG
#endif
#include "debug.h"
#include "util/debug.h"

View file

@ -5,8 +5,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include <iostream>
#include <time.h>
#include <string>
#include <iostream>
namespace lean {
/**

View file

@ -5,10 +5,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "trace.h"
#include <set>
#include <string>
#include <memory>
#include "util/trace.h"
#ifndef LEAN_TRACE_OUT
#define LEAN_TRACE_OUT ".lean_trace"

View file

@ -7,8 +7,8 @@ Author: Leonardo de Moura
#pragma once
#ifdef LEAN_TRACE
#include <fstream>
#include <mutex>
#include <fstream>
namespace lean {
extern std::ofstream tout;
extern std::mutex trace_mutex;