Skip to content
Snippets Groups Projects
Commit 40d00f25 authored by SimonGuilloud's avatar SimonGuilloud
Browse files

Correction of small error regarding function and predicate definition.

parent ee791ebd
No related branches found
No related tags found
1 merge request!11Correction of small error regarding function and predicate definition. Fix to missing case in printer match.
...@@ -107,7 +107,7 @@ class RunningTheory { ...@@ -107,7 +107,7 @@ class RunningTheory {
def makePredicateDefinition(label: ConstantPredicateLabel, args: Seq[VariableLabel], phi: Formula): RunningTheoryJudgement[this.PredicateDefinition] = { def makePredicateDefinition(label: ConstantPredicateLabel, args: Seq[VariableLabel], phi: Formula): RunningTheoryJudgement[this.PredicateDefinition] = {
if (belongsToTheory(phi)) if (belongsToTheory(phi))
if (!isAcceptedPredicateLabel(label)) if (!isAcceptedPredicateLabel(label))
if (phi.freeVariables.isEmpty && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty) if (phi.freeVariables.subsetOf(args.toSet) && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty)
val newDef = PredicateDefinition(label, args, phi) val newDef = PredicateDefinition(label, args, phi)
predDefinitions.update(label, Some(newDef)) predDefinitions.update(label, Some(newDef))
RunningTheoryJudgement.ValidJustification(newDef) RunningTheoryJudgement.ValidJustification(newDef)
...@@ -133,7 +133,7 @@ class RunningTheory { ...@@ -133,7 +133,7 @@ class RunningTheory {
def makeFunctionDefinition(proof: SCProof, justifications:Seq[Justification], label: ConstantFunctionLabel, args: Seq[VariableLabel], out: VariableLabel, phi: Formula): RunningTheoryJudgement[this.FunctionDefinition] = { def makeFunctionDefinition(proof: SCProof, justifications:Seq[Justification], label: ConstantFunctionLabel, args: Seq[VariableLabel], out: VariableLabel, phi: Formula): RunningTheoryJudgement[this.FunctionDefinition] = {
if (belongsToTheory(phi)) if (belongsToTheory(phi))
if (!isAcceptedFunctionLabel(label)) if (!isAcceptedFunctionLabel(label))
if (phi.freeVariables.isEmpty && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty) if (phi.freeVariables.subsetOf(args.toSet + out) && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty)
if (proof.imports.forall(i => justifications.exists( j => isSameSequent(i, sequentFromJustification(j))))) if (proof.imports.forall(i => justifications.exists( j => isSameSequent(i, sequentFromJustification(j)))))
val r = SCProofChecker.checkSCProof(proof) val r = SCProofChecker.checkSCProof(proof)
r match { r match {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment