-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Summer2023/add new psb2 instructions #29
base: premerge_28_29
Are you sure you want to change the base?
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. |
@@ -3,7 +3,8 @@ | |||
(:require [clojure.core :as core] | |||
[clojure.set :as set] | |||
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. `log2 and `log10 should work with no dealias.
No description provided.