-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSMTTest2.hs
36 lines (26 loc) · 1.04 KB
/
SMTTest2.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{-# LANGUAGE GADTs #-}
{-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
{-@ LIQUID "--short-names" @-}
module SMTTest2 where
import Prelude hiding (max)
import Language.Haskell.Liquid.ProofCombinators hiding (withProof)
import SMTTest
semantics = (Step, EvalsTo)
basics = (TBool, TInt)
-----------------------------------------------------------------------------
----- | JUDGEMENTS : the Bare-Typing Relation
-----------------------------------------------------------------------------
data HasFTypeP where
HasFType :: FEnv -> Expr -> FType -> HasFTypeP
data HasFType where
FTBC :: FEnv -> Bool -> HasFType
FTIC :: FEnv -> Int -> HasFType
{-@ data HasFType where
FTBC :: g:FEnv -> b:Bool -> ProofOf(HasFType g (Bc b) (FTBasic TBool))
| FTIC :: g:FEnv -> n:Int -> ProofOf(HasFType g (Ic n) (FTBasic TInt)) @-}
-- {-@ measure ftypSize @-}
{-@ ftypSize :: HasFType -> { n:Int | n >= 0 } @-}
ftypSize :: HasFType -> Int
ftypSize (FTBC {}) = 1
ftypSize (FTIC {}) = 1