Skip to content
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

Open
wants to merge 59 commits into
base: premerge_28_29
Choose a base branch
from

Conversation

anthonyhevia
Copy link

No description provided.

thelmuth and others added 30 commits January 14, 2023 21:13
Refactors composite suite case generators
Fixes `penalize-nil` in composite suite for all collections
@thelmuth
Copy link
Collaborator

thelmuth commented Jul 5, 2023

Note: this uses the composite types commits, so do this one second and it should merge a lot cleaner.

@erp12 erp12 mentioned this pull request Jul 9, 2023
@erp12 erp12 changed the base branch from master to premerge_28_29 July 9, 2023 20:14
@erp12
Copy link
Owner

erp12 commented Jul 9, 2023

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]))
Copy link
Owner

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.

Comment on lines +19 to +22
(let [type-thing
(set (keys (lib/lib-for-types types)))]
(println "Vars for this problem:" type-thing)
type-thing))
Copy link
Owner

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.

Copy link
Collaborator

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

Copy link
Owner

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.

Comment on lines +503 to +504
'asin (unary-transform DOUBLE)
'acos (unary-transform DOUBLE)
Copy link
Owner

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.

Comment on lines +506 to +507
'log2 (unary-transform DOUBLE)
'log10 (unary-transform DOUBLE)
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants