-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[models] Actually print values, not terms
This patch makes it so that the model values that we print are actually values, not terms (i.e. they do not contain variables). This is achieved by aggressively substituting variable definitions when printing. The patch is a bit more involved than I'd have liked, because we can't simply substitute semantic values into terms, so the guts of the model printing had to be changed a little. The code now works in two pass. In the first pass, we build a hash table from symbols (constants and arrays) to their respective definitions using the new `value_defn` mini-language, which we then use for printing. The substitution is performed on-the-fly in the second pass, which actually prints, using the hash table that was built in the first pass.
- Loading branch information
1 parent
e37a65e
commit 8fa8ac0
Showing
5 changed files
with
160 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.