-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forgot to add new file in previous commit
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Duper.ProverM | ||
import Duper.Simp | ||
import Duper.Rules.ClauseSubsumption | ||
import Duper.Rules.ContextualLiteralCutting | ||
import Duper.Rules.Demodulation | ||
import Duper.Rules.EqualitySubsumption | ||
import Duper.Rules.SimplifyReflect | ||
|
||
namespace Duper | ||
namespace ProverM | ||
|
||
def backwardSimpRules : ProverM (Array BackwardSimpRule) := do | ||
let subsumptionTrie ← getSubsumptionTrie | ||
return #[ | ||
(backwardDemodulation (← getDemodMainPremiseIdx)).toBackwardSimpRule, | ||
(backwardClauseSubsumption subsumptionTrie).toBackwardSimpRule, | ||
(backwardEqualitySubsumption subsumptionTrie).toBackwardSimpRule, | ||
(backwardContextualLiteralCutting subsumptionTrie).toBackwardSimpRule, | ||
(backwardPositiveSimplifyReflect subsumptionTrie).toBackwardSimpRule, | ||
(backwardNegativeSimplifyReflect subsumptionTrie).toBackwardSimpRule | ||
] | ||
|
||
/-- Uses the givenClause to attempt to simplify other clauses in the active set. For each clause that backwardSimplify is | ||
able to produce a simplification for, backwardSimplify removes the clause adds any newly simplified clauses to the passive set. | ||
Additionally, for each clause removed from the active set in this way, all descendents of said clause should also be removed from | ||
the current state's allClauses and passiveSet -/ | ||
def backwardSimplify (givenClause : Clause) : ProverM Unit := do | ||
trace[Prover.saturate] "backward simplify with {givenClause}" | ||
let backwardSimpRules ← backwardSimpRules | ||
for i in [0 : backwardSimpRules.size] do | ||
let simpRule := backwardSimpRules[i]! | ||
simpRule givenClause |