source: src/ResolvExpr/Unify.hpp @ 405dbb3

Last change on this file since 405dbb3 was c92bdcc, checked in by Andrew Beach <ajbeach@…>, 6 months ago

Updated the rest of the names in src/ (except for the generated files).

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[a32b204]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
[c92bdcc]7// Unify.hpp --
[a32b204]8//
9// Author           : Richard C. Bilson
10// Created On       : Sun May 17 13:09:04 2015
[e563edf]11// Last Modified By : Andrew Beach
12// Last Modified On : Tue Jan 17 11:12:00 2023
13// Update Count     : 5
[a32b204]14//
[51b7345]15
[6b0b624]16#pragma once
[51b7345]17
[f474e91]18#include "AST/Node.hpp"             // for ptr
[d76c588]19#include "AST/TypeEnvironment.hpp"  // for TypeEnvironment, AssertionSet, OpenVarSet
[c92bdcc]20#include "WidenMode.hpp"            // for WidenMode
[ea6332d]21
[d76c588]22namespace ast {
23        class SymbolTable;
24        class Type;
25}
[51b7345]26
27namespace ResolvExpr {
[e563edf]28
29bool unify(
30        const ast::ptr<ast::Type> & type1, const ast::ptr<ast::Type> & type2,
31        ast::TypeEnvironment & env, ast::AssertionSet & need, ast::AssertionSet & have,
[251ce80]32        ast::OpenVarSet & open );
[e563edf]33
34bool unify(
35        const ast::ptr<ast::Type> & type1, const ast::ptr<ast::Type> & type2,
36        ast::TypeEnvironment & env, ast::AssertionSet & need, ast::AssertionSet & have,
[251ce80]37        ast::OpenVarSet & open, ast::ptr<ast::Type> & common );
[e563edf]38
39bool unifyExact(
40        const ast::Type * type1, const ast::Type * type2, ast::TypeEnvironment & env,
41        ast::AssertionSet & need, ast::AssertionSet & have, const ast::OpenVarSet & open,
[251ce80]42        WidenMode widen );
[e563edf]43
44bool unifyInexact(
45        const ast::ptr<ast::Type> & type1, const ast::ptr<ast::Type> & type2,
46        ast::TypeEnvironment & env, ast::AssertionSet & need, ast::AssertionSet & have,
[2908f08]47        const ast::OpenVarSet & open, WidenMode widen,
[e563edf]48        ast::ptr<ast::Type> & common );
49
50bool typesCompatible(
[2908f08]51        const ast::Type *, const ast::Type *,
[e563edf]52        const ast::TypeEnvironment & env = {} );
53
54bool typesCompatibleIgnoreQualifiers(
[251ce80]55        const ast::Type *, const ast::Type *,
[e563edf]56        const ast::TypeEnvironment & env = {} );
[d76c588]57
[7b5694d]58/// Creates or extracts the type represented by returns in a `FunctionType`.
59ast::ptr<ast::Type> extractResultType( const ast::FunctionType * func );
60
61std::vector<ast::ptr<ast::Type>> flattenList(
62        const std::vector<ast::ptr<ast::Type>> & src, ast::TypeEnvironment & env
63);
64
[51b7345]65} // namespace ResolvExpr
66
[a32b204]67// Local Variables: //
68// tab-width: 4 //
69// mode: c++ //
70// compile-command: "make install" //
71// End: //
Note: See TracBrowser for help on using the repository browser.