public class TypeTestNormalisation extends AbstractClosureRule implements Proof.LinearRule
Responsible for normalising type tests involving record accesses. For example, consider the following assertion:
type Point is {null|int x, null|int y}
assert:
forall(Point p):
if:
p.x is !null
then:
p.x is int
In solving this, we end up with truths p.x is !null and
p.x is int. These are then refined by this rule to be
p is {!null x, ...} and p is {int x, ...}. Doing
this allows the variable to be exposed which, in turn, enables a retyping of
that variable to give the contradiction.
simp, types| Constructor and Description |
|---|
TypeTestNormalisation(Simplification simplify,
TypeSystem types) |
| Modifier and Type | Method and Description |
|---|---|
Proof.State |
apply(Proof.Delta.Set existingTruths,
Proof.State head,
Formula newTruth) |
String |
getName()
Get the name of this rule
|
apply, apply, getExistingTruthsextractDefinedTerms, findAllInstances, substituteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplypublic TypeTestNormalisation(Simplification simplify, TypeSystem types)
public String getName()
Proof.RulegetName in interface Proof.Rulepublic Proof.State apply(Proof.Delta.Set existingTruths, Proof.State head, Formula newTruth) throws wybs.lang.NameResolver.ResolutionError
apply in class AbstractClosureRulewybs.lang.NameResolver.ResolutionErrorCopyright © 2017. All rights reserved.