Skip to content

Commit

Permalink
Set DataDecls when creating SymEnv
Browse files Browse the repository at this point in the history
This is still far from fully-implemented symEnv,
but at least we have the 'data'.
  • Loading branch information
shingarov committed Oct 13, 2024
1 parent b63a6ba commit 788526b
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/Refinements/SymEnv.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,29 @@ SymEnv class >> new [
self shouldNotImplement
]

{ #category : #'instance creation' }
SymEnv class >> sort: xEnv theory: fEnv data: dEnv lits: ls appls: sortMap [
^self basicNew
sort: xEnv;
theory: fEnv;
data: dEnv;
lits: ls;
appls: sortMap;
yourself
]

{ #category : #'instance creation' }
SymEnv class >> xEnv: xEnv fEnv: fEnv ds: ds ls: ls ts: ts [
"
symEnv :: SEnv Sort -> SEnv TheorySymbol -> [DataDecl] -> SEnv Sort -> [Sort] -> SymEnv
xEnv fEnv ds ls ts
Cf. Types/Theories.hs
"
^self basicNew "BOGUS: for now, the bare minimum we can get away with"
sort: xEnv;
"theory: ?;
data: ?;
lits: ?;
appls: ?;"
yourself
| xEnv′ dEnv sortMap |
"BOGUS: for now, the bare minimum we can get away with"
xEnv′ := xEnv "unionSEnv xEnv wiredInEnv".
dEnv := SEnv newFromAssociations: ( ds collect: [ :d | d symbol -> d ] ).
^SymEnv sort: xEnv′ theory: fEnv data: dEnv lits: ls appls: sortMap "sortMap is at this time out of necessity BOGUS because ts is bogus"
]

{ #category : #Semigroup }
Expand Down

0 comments on commit 788526b

Please sign in to comment.