2013-07-25 02:36:54 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
2013-08-20 03:00:35 +00:00
|
|
|
#include <memory>
|
2013-09-13 10:35:29 +00:00
|
|
|
#include "kernel/expr.h"
|
2013-07-25 02:36:54 +00:00
|
|
|
|
|
|
|
namespace lean {
|
2014-02-20 01:28:26 +00:00
|
|
|
class ro_environment;
|
2013-08-23 16:16:54 +00:00
|
|
|
class options;
|
2013-08-20 03:00:35 +00:00
|
|
|
/** \brief Functional object for normalizing expressions */
|
|
|
|
class normalizer {
|
2013-08-20 23:34:10 +00:00
|
|
|
class imp;
|
2013-08-20 03:00:35 +00:00
|
|
|
std::unique_ptr<imp> m_ptr;
|
|
|
|
public:
|
2013-12-13 00:33:31 +00:00
|
|
|
normalizer(ro_environment const & env);
|
|
|
|
normalizer(ro_environment const & env, unsigned max_depth);
|
|
|
|
normalizer(ro_environment const & env, options const & opts);
|
2013-08-20 03:00:35 +00:00
|
|
|
~normalizer();
|
|
|
|
|
2014-02-20 01:28:26 +00:00
|
|
|
expr operator()(expr const & e);
|
2013-08-20 03:00:35 +00:00
|
|
|
void clear();
|
|
|
|
};
|
2014-02-20 01:28:26 +00:00
|
|
|
|
2013-08-03 21:16:32 +00:00
|
|
|
/** \brief Normalize \c e using the environment \c env and context \c ctx */
|
2014-02-20 01:28:26 +00:00
|
|
|
expr normalize(expr const & e, ro_environment const & env);
|
2013-07-25 02:36:54 +00:00
|
|
|
}
|