Skip to content

Commit 5aa0060

Browse files
committed
Refactor Ty >> #newUndefined
This commit refactor `#newUndefined`. The implementation was temporary and completely bogus. This commits replaces the old implementation with new one which simply return a fresh Z3 variable of corresponding sort, prefixed with string "undefined" to make it easier to spot. While at it, move the method to `Sail-Jib-Interpreter` package.
1 parent 3afb0a7 commit 5aa0060

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

src/Sail-Jib/Ty.class.st

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
Class {
22
#name : #Ty,
33
#superclass : #JibProgramNode,
4-
#classVars : [
5-
'UndefinedValue'
6-
],
74
#category : #'Sail-Jib'
85
}
96

@@ -30,11 +27,6 @@ Ty class >> inducedParser [
3027

3128
]
3229

33-
{ #category : #initialization }
34-
Ty class >> initialize [
35-
UndefinedValue := '<undefined>' copy.
36-
]
37-
3830
{ #category : #testing }
3931
Ty class >> isAbstract [
4032
^self == Ty
@@ -46,16 +38,13 @@ Ty >> childrenDo: aBlock [
4638

4739
]
4840

41+
{ #category : #'as yet unclassified' }
42+
Ty >> newUndefined [
43+
^ self sort mkFreshConst: 'undefined'
44+
]
45+
4946
{ #category : #accessing }
5047
Ty >> sort [
5148
"Return the Z3 sort representing this (Jib) type."
5249
^ self subclassResponsibility
5350
]
54-
55-
{ #category : #'instance creation' }
56-
Ty >> newUndefined [
57-
"Return 'undefined' value of this type. This will be the initial
58-
value before first assignment."
59-
60-
^UndefinedValue "BOGUS, fix once we have type elaboration in place"
61-
]

0 commit comments

Comments
 (0)