-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close #900: improve support for tail calls
- Loading branch information
1 parent
40d1b5b
commit e3ad4db
Showing
10 changed files
with
139 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2018-present The Alive2 Authors. | ||
// Distributed under the MIT license that can be found in the LICENSE file. | ||
|
||
#include "ir/functions.h" | ||
|
||
using namespace smt; | ||
|
||
namespace IR { | ||
|
||
expr PtrInput::implies(const PtrInput &rhs) const { | ||
return implies_attrs(rhs) && val == rhs.val && idx == rhs.idx; | ||
} | ||
|
||
expr PtrInput::implies_attrs(const PtrInput &rhs) const { | ||
return byval == rhs.byval && | ||
rhs.noread .implies(noread) && | ||
rhs.nowrite .implies(nowrite) && | ||
rhs.nocapture.implies(nocapture); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
// Copyright (c) 2018-present The Alive2 Authors. | ||
// Distributed under the MIT license that can be found in the LICENSE file. | ||
|
||
#include "ir/state_value.h" | ||
#include "smt/expr.h" | ||
|
||
namespace IR { | ||
|
||
struct PtrInput { | ||
unsigned idx = 0; | ||
StateValue val; | ||
smt::expr byval = false; | ||
smt::expr noread = false; | ||
smt::expr nowrite = false; | ||
smt::expr nocapture = false; | ||
|
||
PtrInput(unsigned idx, StateValue &&val, smt::expr &&byval, | ||
smt::expr &&noread, smt::expr &&nowrite, smt::expr &&nocapture) : | ||
idx(idx), val(std::move(val)), byval(std::move(byval)), | ||
noread(std::move(noread)), nowrite(std::move(nowrite)), | ||
nocapture(std::move(nocapture)) {} | ||
|
||
PtrInput(const StateValue &val) : val(val) {} | ||
PtrInput(const smt::expr &val) : val(StateValue(smt::expr(val), true)) {} | ||
|
||
smt::expr implies(const PtrInput &rhs) const; | ||
smt::expr implies_attrs(const PtrInput &rhs) const; | ||
auto operator<=>(const PtrInput &rhs) const = default; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.