Skip to content

Commit

Permalink
Work on rendering of theories.
Browse files Browse the repository at this point in the history
  • Loading branch information
weetmuts committed Jul 13, 2024
1 parent 2a939d8 commit 6a34c9e
Show file tree
Hide file tree
Showing 25 changed files with 243 additions and 351 deletions.
2 changes: 1 addition & 1 deletion models/SimpleTheoryTest/Fishes.bpo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<org.eventb.core.poSequent name="thm1/S-THM" org.eventb.core.accurate="true" org.eventb.core.poDesc="Therorem Soundness" org.eventb.core.poStamp="0">
<org.eventb.core.poPredicateSet name="SEQHYP" org.eventb.core.parentSet="/SimpleTheoryTest/Fishes.bpo|org.eventb.core.poFile#Fishes|org.eventb.core.poPredicateSet#ABSHYP"/>
<org.eventb.core.poPredicate name="SEQHYQ" org.eventb.core.predicate="1∈ℕ" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#*"/>
<org.eventb.core.poSource name="SEQHYR" org.eventb.core.poRole="DEFAULT" org.eventb.core.source="/SimpleTheoryTest/Fishes.tcf|org.eventb.theory.core.scTheoryRoot#Fishes|org.eventb.theory.core.scTheorem#Salmoo"/>
<org.eventb.core.poSource name="SEQHYR" org.eventb.core.poRole="DEFAULT" org.eventb.core.source="/SimpleTheoryTest/Fishes.tcf|org.eventb.theory.core.scTheoryRoot#Fishes|org.eventb.theory.core.scTheorem#generatedBlocl"/>
<org.eventb.core.poSource name="SEQHYS" org.eventb.core.poRole="DEFAULT" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#*"/>
<org.eventb.core.poSelHint name="SEQHYT" org.eventb.core.poSelHintFst="/SimpleTheoryTest/Fishes.bpo|org.eventb.core.poFile#Fishes|org.eventb.core.poPredicateSet#ABSHYP" org.eventb.core.poSelHintSnd="/SimpleTheoryTest/Fishes.bpo|org.eventb.core.poFile#Fishes|org.eventb.core.poSequent#thm1\/S-THM|org.eventb.core.poPredicateSet#SEQHYP"/>
</org.eventb.core.poSequent>
Expand Down
12 changes: 12 additions & 0 deletions models/SimpleTheoryTest/Fishes.bpr
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@
<org.eventb.theory.core.scDatatypeConstructor name="LeBigFish"/>
<org.eventb.theory.core.scDatatypeConstructor name="LeSmallFish"/>
</org.eventb.theory.core.scDatatypeDefinition>
<org.eventb.theory.core.scDatatypeDefinition name="Bass">
<org.eventb.theory.core.scDatatypeConstructor name="boson"/>
<org.eventb.theory.core.scDatatypeConstructor name="oson">
<org.eventb.theory.core.scConstructorArgument name="son" org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scConstructorArgument name="nos" org.eventb.core.type="Bass"/>
</org.eventb.theory.core.scDatatypeConstructor>
</org.eventb.theory.core.scDatatypeDefinition>
<org.eventb.theory.core.scNewOperatorDefinition name="addo" org.eventb.core.label="addo" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.associative="false" org.eventb.theory.core.commutative="false" org.eventb.theory.core.formulaType="true" org.eventb.theory.core.groupID="infix extended expression group" org.eventb.theory.core.hasError="false" org.eventb.theory.core.notationType="INFIX" org.eventb.theory.core.type="" org.eventb.theory.core.wd="">
<org.eventb.theory.core.scOperatorArgument name="a" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.operatorArgument#'" org.eventb.core.type="Salmon(T)"/>
<org.eventb.theory.core.scOperatorArgument name="b" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.operatorArgument#)" org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scDirectOperatorDefinition name="(" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.directOperatorDefinition#(" org.eventb.theory.core.formula="17"/>
</org.eventb.theory.core.scNewOperatorDefinition>
</org.eventb.core.lang>
<org.eventb.core.prRule name="r0" org.eventb.core.confidence="1000" org.eventb.core.prDisplay="simplification rewrites" org.eventb.core.prGoal="p0" org.eventb.core.prHyps="">
<org.eventb.core.prAnte name="'" org.eventb.core.prGoal="p1">
Expand Down
27 changes: 23 additions & 4 deletions models/SimpleTheoryTest/Fishes.dtf
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<org.eventb.theory.core.deployedTheoryRoot org.eventb.core.accurate="true" org.eventb.core.comment="GENERATED THEORY FILE: !DO NOT CHANGE!" org.eventb.theory.core.modificationHashValue="3a6e0e8a9b2e2ce08a4e89f9b2a407e1" org.eventb.theory.core.outdated="false">
<org.eventb.theory.core.deployedTheoryRoot org.eventb.core.accurate="true" org.eventb.core.comment="GENERATED THEORY FILE: !DO NOT CHANGE!" org.eventb.theory.core.modificationHashValue="c00a26b28581228cb8aa241ce776224d" org.eventb.theory.core.outdated="false">
<org.eventb.theory.core.useTheory name="Crabs" org.eventb.core.scTarget="/SimpleTheoryTest/Crabs.dtf|org.eventb.theory.core.deployedTheoryRoot#Crabs"/>
<org.eventb.theory.core.scTypeParameter name="T" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.typeParameter#(" org.eventb.core.type="ℙ(T)"/>
<org.eventb.theory.core.scDatatypeDefinition name="Salmon" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#)" org.eventb.theory.core.hasError="false">
<org.eventb.theory.core.scTypeArgument name="T" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#)|org.eventb.theory.core.typeArgument#'" org.eventb.theory.core.givenType="T"/>
<org.eventb.theory.core.scDatatypeConstructor name="LeBigFish" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#)|org.eventb.theory.core.datatypeConstructor#("/>
<org.eventb.theory.core.scDatatypeConstructor name="LeSmallFish" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#)|org.eventb.theory.core.datatypeConstructor#)"/>
</org.eventb.theory.core.scDatatypeDefinition>
<org.eventb.theory.core.scTheorem name="Salmoo" org.eventb.core.label="thm1" org.eventb.core.predicate="1∈ℕ" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#*" org.eventb.theory.core.order="0"/>
<org.eventb.theory.core.scTheorem name="Salmop" org.eventb.core.label="thm2" org.eventb.core.predicate="(LeBigFish ⦂ Salmon(T))∈Salmon(T)" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#+" org.eventb.theory.core.order="1"/>
<org.eventb.theory.core.scTheorem name="Salmoq" org.eventb.core.label="thm3" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#," org.eventb.theory.core.order="2"/>
<org.eventb.theory.core.scDatatypeDefinition name="Bass" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-" org.eventb.theory.core.hasError="false">
<org.eventb.theory.core.scDatatypeConstructor name="boson" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#'"/>
<org.eventb.theory.core.scDatatypeConstructor name="oson" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#(">
<org.eventb.theory.core.scConstructorArgument name="son" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#(|org.eventb.theory.core.constructorArgument#'" org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scConstructorArgument name="nos" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#(|org.eventb.theory.core.constructorArgument#(" org.eventb.core.type="Bass"/>
</org.eventb.theory.core.scDatatypeConstructor>
</org.eventb.theory.core.scDatatypeDefinition>
<org.eventb.theory.core.scNewOperatorDefinition name="Salmoo" org.eventb.core.label="addo" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.associative="false" org.eventb.theory.core.commutative="false" org.eventb.theory.core.formulaType="true" org.eventb.theory.core.groupID="infix extended expression group" org.eventb.theory.core.hasError="false" org.eventb.theory.core.notationType="INFIX" org.eventb.theory.core.type="" org.eventb.theory.core.wd="">
<org.eventb.theory.core.scOperatorArgument name="a" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.operatorArgument#'" org.eventb.core.type="Salmon(T)"/>
<org.eventb.theory.core.scOperatorArgument name="b" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.operatorArgument#)" org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scDirectOperatorDefinition name="(" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.directOperatorDefinition#(" org.eventb.theory.core.formula="17"/>
</org.eventb.theory.core.scNewOperatorDefinition>
<org.eventb.theory.core.scTheorem name="generatedBlocl" org.eventb.core.label="thm1" org.eventb.core.predicate="1∈ℕ" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#*" org.eventb.theory.core.order="0"/>
<org.eventb.theory.core.scTheorem name="generatedBlocm" org.eventb.core.label="thm2" org.eventb.core.predicate="(LeBigFish ⦂ Salmon(T))∈Salmon(T)" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#+" org.eventb.theory.core.order="1"/>
<org.eventb.theory.core.scTheorem name="generatedBlocn" org.eventb.core.label="thm3" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#," org.eventb.theory.core.order="2"/>
<org.eventb.theory.core.scProofRulesBlock name="generatedBlock" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.">
<org.eventb.theory.core.scMetavariable name="a" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.core.type="Salmon(T)"/>
<org.eventb.theory.core.scMetavariable name="b" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scRewriteRule name="Fishes.addo" org.eventb.core.accurate="true" org.eventb.core.label="Fishes.addo" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.applicability="interactive" org.eventb.theory.core.complete="true" org.eventb.theory.core.definitional="true" org.eventb.theory.core.desc="addo expansion" org.eventb.theory.core.formula="a addo b">
<org.eventb.theory.core.scRewriteRuleRHS name="addo rhs" org.eventb.core.label="addo rhs" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.formula="17"/>
</org.eventb.theory.core.scRewriteRule>
</org.eventb.theory.core.scProofRulesBlock>
</org.eventb.theory.core.deployedTheoryRoot>
25 changes: 22 additions & 3 deletions models/SimpleTheoryTest/Fishes.tcf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@
<org.eventb.theory.core.scDatatypeConstructor name="LeBigFish" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#)|org.eventb.theory.core.datatypeConstructor#("/>
<org.eventb.theory.core.scDatatypeConstructor name="LeSmallFish" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#)|org.eventb.theory.core.datatypeConstructor#)"/>
</org.eventb.theory.core.scDatatypeDefinition>
<org.eventb.theory.core.scTheorem name="Salmoo" org.eventb.core.label="thm1" org.eventb.core.predicate="1∈ℕ" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#*" org.eventb.theory.core.order="0"/>
<org.eventb.theory.core.scTheorem name="Salmop" org.eventb.core.label="thm2" org.eventb.core.predicate="(LeBigFish ⦂ Salmon(T))∈Salmon(T)" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#+" org.eventb.theory.core.order="1"/>
<org.eventb.theory.core.scTheorem name="Salmoq" org.eventb.core.label="thm3" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#," org.eventb.theory.core.order="2"/>
<org.eventb.theory.core.scDatatypeDefinition name="Bass" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-" org.eventb.theory.core.hasError="false">
<org.eventb.theory.core.scDatatypeConstructor name="boson" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#'"/>
<org.eventb.theory.core.scDatatypeConstructor name="oson" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#(">
<org.eventb.theory.core.scConstructorArgument name="son" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#(|org.eventb.theory.core.constructorArgument#'" org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scConstructorArgument name="nos" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.datatypeDefinition#-|org.eventb.theory.core.datatypeConstructor#(|org.eventb.theory.core.constructorArgument#(" org.eventb.core.type="Bass"/>
</org.eventb.theory.core.scDatatypeConstructor>
</org.eventb.theory.core.scDatatypeDefinition>
<org.eventb.theory.core.scNewOperatorDefinition name="Salmoo" org.eventb.core.label="addo" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.associative="false" org.eventb.theory.core.commutative="false" org.eventb.theory.core.formulaType="true" org.eventb.theory.core.groupID="infix extended expression group" org.eventb.theory.core.hasError="false" org.eventb.theory.core.notationType="INFIX" org.eventb.theory.core.type="" org.eventb.theory.core.wd="">
<org.eventb.theory.core.scOperatorArgument name="a" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.operatorArgument#'" org.eventb.core.type="Salmon(T)"/>
<org.eventb.theory.core.scOperatorArgument name="b" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.operatorArgument#)" org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scDirectOperatorDefinition name="(" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.|org.eventb.theory.core.directOperatorDefinition#(" org.eventb.theory.core.formula="17"/>
</org.eventb.theory.core.scNewOperatorDefinition>
<org.eventb.theory.core.scProofRulesBlock name="generatedBlock" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#.">
<org.eventb.theory.core.scMetavariable name="a" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.core.type="Salmon(T)"/>
<org.eventb.theory.core.scMetavariable name="b" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.core.type="Bass"/>
<org.eventb.theory.core.scRewriteRule name="Fishes.addo" org.eventb.core.accurate="true" org.eventb.core.label="Fishes.addo" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.applicability="interactive" org.eventb.theory.core.complete="true" org.eventb.theory.core.definitional="true" org.eventb.theory.core.desc="addo expansion" org.eventb.theory.core.formula="a addo b">
<org.eventb.theory.core.scRewriteRuleRHS name="addo rhs" org.eventb.core.label="addo rhs" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.newOperatorDefinition#." org.eventb.theory.core.formula="17"/>
</org.eventb.theory.core.scRewriteRule>
</org.eventb.theory.core.scProofRulesBlock>
<org.eventb.theory.core.scTheorem name="generatedBlocl" org.eventb.core.label="thm1" org.eventb.core.predicate="1∈ℕ" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#*" org.eventb.theory.core.order="0"/>
<org.eventb.theory.core.scTheorem name="generatedBlocm" org.eventb.core.label="thm2" org.eventb.core.predicate="(LeBigFish ⦂ Salmon(T))∈Salmon(T)" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#+" org.eventb.theory.core.order="1"/>
<org.eventb.theory.core.scTheorem name="generatedBlocn" org.eventb.core.label="thm3" org.eventb.core.predicate="" org.eventb.core.source="/SimpleTheoryTest/Fishes.tuf|org.eventb.theory.core.theoryRoot#Fishes|org.eventb.theory.core.theorem#," org.eventb.theory.core.order="2"/>
</org.eventb.theory.core.scTheoryRoot>
Loading

0 comments on commit 6a34c9e

Please sign in to comment.