C++: autoformat

This commit is contained in:
Robert Marsh
2022-12-19 12:38:57 -05:00
parent 02f1957919
commit 6db728190e
4 changed files with 26 additions and 21 deletions

View File

@@ -1,22 +1,21 @@
private import RangeAnalysisStage
module FloatDelta implements DeltaSig {
class Delta = float;
bindingset[d]
bindingset[result]
float toFloat(Delta d) {result = d}
bindingset[d]
bindingset[result]
int toInt(Delta d) {result = d}
bindingset[n]
bindingset[result] Delta fromInt(int n) {result = n}
bindingset[f]
bindingset[result] Delta fromFloat(float f) {result = f}
}
class Delta = float;
bindingset[d]
bindingset[result]
float toFloat(Delta d) { result = d }
bindingset[d]
bindingset[result]
int toInt(Delta d) { result = d }
bindingset[n]
bindingset[result]
Delta fromInt(int n) { result = n }
bindingset[f]
bindingset[result]
Delta fromFloat(float f) { result = f }
}

View File

@@ -169,7 +169,9 @@ module ModulusAnalysis<DeltaSig D, BoundSig<D> Bounds, UtilSig<D> U> {
* Holds if all inputs to `phi` numbered `1` to `rix` are equal to `b + val` modulo `mod`.
*/
pragma[nomagic]
private predicate phiModulusRankStep(SemSsaPhiNode phi, Bounds::SemBound b, int val, int mod, int rix) {
private predicate phiModulusRankStep(
SemSsaPhiNode phi, Bounds::SemBound b, int val, int mod, int rix
) {
/*
* base case. If any phi input is equal to `b + val` modulo `mod`, that's a potential congruence
* class for the phi node.

View File

@@ -231,7 +231,9 @@ signature module BoundSig<DeltaSig D> {
class SemBound {
SemExpr getExpr(D::Delta delta);
}
class SemZeroBound extends SemBound;
class SemSsaBound extends SemBound {
SemSsaVariable getAVariable();
}

View File

@@ -49,7 +49,9 @@ module RangeUtil<Range::DeltaSig D, Range::LangSig<D> Lang> implements Range::Ut
* - `isEq = true` : `v == e + delta`
* - `isEq = false` : `v != e + delta`
*/
SemGuard semEqFlowCond(SemSsaVariable v, SemExpr e, D::Delta delta, boolean isEq, boolean testIsTrue) {
SemGuard semEqFlowCond(
SemSsaVariable v, SemExpr e, D::Delta delta, boolean isEq, boolean testIsTrue
) {
exists(boolean eqpolarity |
result.isEquality(semSsaRead(v, delta), e, eqpolarity) and
(testIsTrue = true or testIsTrue = false) and