Skip to content

Summer2023/add new psb2 instructions - #29

Open
anthonyhevia wants to merge 59 commits into
erp12:premerge_28_29from
anthonyhevia:summer2023/add-new-PSB2-instructions
Open

Summer2023/add new psb2 instructions#29
anthonyhevia wants to merge 59 commits into
erp12:premerge_28_29from
anthonyhevia:summer2023/add-new-PSB2-instructions

Conversation

@anthonyhevia

Copy link
Copy Markdown

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

thelmuth commented Jul 5, 2023

Copy link
Copy Markdown
Collaborator

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

erp12 commented Jul 9, 2023

Copy link
Copy Markdown
Owner

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]))

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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