Whiley / WhileyTheoremProver

The Whiley Theorem Prover (WyTP) is an automatic and interactive theorem prover designed to discharge verification conditions generated by the Whiley Compiler. WyTP operates over a variant of first-order logic which includes integer arithmetic, arrays and quantification.
Apache License 2.0
8 stars 2 forks source link

Axioms for Open Records? #59

Open DavePearce opened 7 years ago

DavePearce commented 7 years ago

Having now implemented open records, an interesting question arises. Should the following hold or not?

type OpenPoint is ({int x,int y, ...} p)

assert:
    forall(OpenPoint p):
        if:
            p.z > 0
        then:
            p.z >= 0

The argumentation here is that, since p.z > 0 is an assumption, it follows that the type of p can be inferred as at least {int x, int y, int z, ...}. This would presumably be implementing using an axiom of some kind. However, I don't really know how the type checker should or could handle this.