Skip to content

Commit

Permalink
regenerate tests and mis cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
goodlyrottenapple committed Apr 12, 2024
1 parent 2efdf42 commit 4ff023b
Show file tree
Hide file tree
Showing 9 changed files with 561 additions and 554 deletions.
6 changes: 3 additions & 3 deletions library/Booster/Pattern/Rewrite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,11 @@ data RewriteFailed k
RuleConditionUnclear (RewriteRule k) Predicate
| -- | A rewrite rule does not preserve definedness
DefinednessUnclear (RewriteRule k) Pattern [NotPreservesDefinednessReason]
| -- | A unification produced a non-match substitution
| -- | A matching produced a non-match substitution
UnificationIsNotMatch (RewriteRule k) Term Substitution
| -- | A sort error was detected during unification
| -- | A sort error was detected during m,atching
RewriteSortError (RewriteRule k) Term SortError
| -- | A sort error was detected during unification
| -- | An error was detected during matching
InternalMatchError Text
| -- | Term has index 'None', no rule should apply
TermIndexIsNone Term
Expand Down
11 changes: 5 additions & 6 deletions library/Booster/Pattern/UnifiedMatcher.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE PatternSynonyms #-}

{- |
Copyright : (c) Runtime Verification, 2022
License : BSD-3-Clause
Expand Down Expand Up @@ -118,14 +116,15 @@ instance Pretty FailReason where
type Substitution = Map Variable Term

{- | Attempts to find a simple unifying substitution for the given
terms. Only constructor symbols are considered (no functions).
terms.
The returned substitution is oriented towards 'term1', i.e.,
prefers to replace its variables if given a choice.
This code calls `error` for internal errors (e.g., function
arguments that should not be possible), assuming the caller will
catch and handle those errors.
TODO: This should not be the case and we need to re-factor the code further
to ensure that we always produce a matching substitution without having to check
after running the matcher
-}
matchTerms :: MatchType -> KoreDefinition -> Term -> Term -> MatchResult
matchTerms matchType KoreDefinition{sorts} term1 term2 =
Expand Down
192 changes: 96 additions & 96 deletions test/rpc-integration/test-foundry-bug-report/response-007.json

Large diffs are not rendered by default.

192 changes: 96 additions & 96 deletions test/rpc-integration/test-foundry-bug-report/response-009.json

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions test/rpc-integration/test-foundry-bug-report/response-011.json

Large diffs are not rendered by default.

212 changes: 106 additions & 106 deletions test/rpc-integration/test-foundry-bug-report/response-013.json

Large diffs are not rendered by default.

106 changes: 53 additions & 53 deletions test/rpc-integration/test-foundry-bug-report/response-015.json

Large diffs are not rendered by default.

178 changes: 91 additions & 87 deletions test/rpc-integration/test-log-simplify-json/simplify-log.txt.golden

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion test/rpc-integration/test-log-simplify-json/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ echo "arguments=$*"
diff="git diff --no-index"
# remove "--regenerate" and tweak $diff if it is present

regenerate () {
cp $2 $1
}

client_args=""
for arg in $*; do
case "$arg" in
--regenerate)
echo "Re-generating expectation files"
diff="tee"
diff="regenerate"
;;
*)
client_args+=" $arg"
Expand Down

0 comments on commit 4ff023b

Please sign in to comment.