Skip to content

Commit

Permalink
Expose some problems with interpreted theory symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
shingarov committed Nov 17, 2024
1 parent 768c8bc commit 448efda
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
19 changes: 19 additions & 0 deletions src/Refinements/EBin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ EBin >> bop: anObject [
bop := anObject
]

{ #category : #elaboration }
EBin >> checkOpTy_in: anEnv t₁: leftSort t₂: rightSort [
"
checkOpTy :: Env -> Expr -> Sort -> Sort -> CheckM Sort
"
| s |
(leftSort = Int sort) & (rightSort = Int sort) ifTrue: [ ^Int sort ].
s := Z3Sort unify: anEnv maybeExpr: self sort: leftSort sort: rightSort.
s isNil ifFalse: [
"
| Just s <- unify f (Just e) t t'
= checkNumeric f (apply s t) >> return (apply s t)
"
s isEmpty ifFalse: [ self shouldBeImplemented "checkNumeric f (apply s t) >> return (apply s t)" ].
^leftSort
].
self error
]

{ #category : #elaboration }
EBin >> elab: f [
"
Expand Down
11 changes: 0 additions & 11 deletions src/Refinements/Expr.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,6 @@ Expr >> checkExpr: γ [
(self evaluateIn: (EvalEnv ofSorts: γ)) sort shouldBeImplemented
]

{ #category : #elaboration }
Expr >> checkOpTy_in: anEnv t₁: leftSort t₂: rightSort [
"
checkOpTy :: Env -> Expr -> Sort -> Sort -> CheckM Sort
"

leftSort isIntSort & rightSort isIntSort ifTrue: [ ^Int sort ].

self shouldBeImplemented
]

{ #category : #GT }
Expr >> children [
^#()
Expand Down

0 comments on commit 448efda

Please sign in to comment.