Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/Refinements-Tests/FQPosTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,21 @@ wf:
reft {v: int | $k0}
'
]

{ #category : #tests }
FQPosTest >> testUndef01 [
self provePos: '
data LL 1 = [
| emp { }
| con { lHead : @(0), lTail : LL @(0) }
]

bind 1 undef : {v: func(1, [@(0)]) | Bool true}

constraint:
env [1]
lhs {v : LL int | v === undef}
rhs {v : LL int | 0 toInt < 7}
id 1 tag []
'
]
2 changes: 1 addition & 1 deletion src/Refinements/EVar.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ eCstAtom f@(sym,g) (EVar x) t
g := f env.
^g∘sym
ifFound: [ :s | (s isUndef and: [(sym_ isInt: t) not])
ifTrue: [ self shouldBeImplemented ]
ifTrue: [ "(`ECst` t) <$> elabAs f t (EApp (eVar tyCastName) (eVar x))" self shouldBeImplemented ]
ifFalse: [ super eCstAtom: t inElabEnv: f ] ]
alts: [ super eCstAtom: t inElabEnv: f ]
]
Expand Down
5 changes: 3 additions & 2 deletions src/Refinements/PreSort.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ PreSort >> isUndef [
isUndef :: Sort -> Bool
Cf. SortCheck.hs
"
| is_srt is srt |
| is_srt is srt j |
is_srt := self bkAbs.
is := is_srt key. srt := is_srt value.
(srt isKindOf: FVar) ifFalse: [ ^false ].
^self shouldBeImplemented
j := srt i.
^is includes: j
]

{ #category : #'as yet unclassified' }
Expand Down
Loading