Summer2023/add new psb2 instructions - #29
Conversation
Refactors composite suite case generators
Fixes `penalize-nil` in composite suite for all collections
…f a composite type were found.
… take two of the same type as arguments.
|
Note: this uses the composite types commits, so do this one second and it should merge a lot cleaner. |
|
See this comment and following thread on #28 for details on how we will merge this. |
| [clojure.string :as str] | ||
| [erp12.cbgp-lite.lang.schema :as schema])) | ||
| [erp12.cbgp-lite.lang.schema :as schema] | ||
| [erp12.cbgp-lite.lang.lib :as lib])) |
There was a problem hiding this comment.
This namespace probably shouldn't import itself.
| (let [type-thing | ||
| (set (keys (lib/lib-for-types types)))] | ||
| (println "Vars for this problem:" type-thing) | ||
| type-thing)) |
There was a problem hiding this comment.
I like the idea of logging all the vars used during a run!
I think we should use the logging library rather than a print statement so that we can control if it goes to stdout or a file and we get additional information in the log (timestamp, location in the code, etc). It should be as easy as using log/info instead of println.
Also, this log statement would probably be more appropriate at the location we start a run. Somewhere around here, you can get the data to log using (:vars opts).
The vars-for-types function is for getting all variables which only use values of the given types. It may not always get called exactly once per run at the start of the run.
There was a problem hiding this comment.
Does (:vars opts) contain only variables which use values of the given types? If so, good, cause that's why we were printing it in vars-for-types
There was a problem hiding this comment.
We should add some tests for the new functions in this test/erp12/cbgp_lite/lang/lib_test.clj. Especially for the edge cases like nan and infinity.
| 'asin (unary-transform DOUBLE) | ||
| 'acos (unary-transform DOUBLE) |
There was a problem hiding this comment.
I think these can be `asin and `acos (instead of 'asin and 'acos) and then you won't need an entry in dealiases.
| 'log2 (unary-transform DOUBLE) | ||
| 'log10 (unary-transform DOUBLE) |
There was a problem hiding this comment.
Same here. `log2 and `log10 should work with no dealias.
No description provided.