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

I139 ir #156

Merged
merged 409 commits into from Apr 8, 2019
Merged

I139 ir #156

merged 409 commits into from Apr 8, 2019

Conversation

richfitz
Copy link
Member

A complete rewrite of the odin engine, designed to increase future maintainability but have few user-visible effects. In brief, this does add

  • Ability to transpile to R (removing the need for a C compiler, though creating code that is necessarily much slower than the compiled verison). Pass target = "r" to use this.
  • A new intermediate representation for odin models that can be used to determine features of a model
  • Better caching (#64)
  • Delays on discrete time models are much more efficient and work properly with stochastic equations (#72, #98)

This does introduce a few user-visible breaking changes:

  • use of array indices outside of an array subset (e.g., x[] <- i) produces output that is off-by-one compared with the previous version (see #136)
  • The "safe" mode has been removed, at least for now. This failed to compile for complex models and was not well used. A better static check mechanism will be introduced (#148)
  • Arguments to odin() have been modified slightly
  • odin_package() no longer supports multi-file mode (I don't think this was ever used).
  • Argument order in generated functions, as well as variable/output order, is likely to change but this should not generally be relied upon.
  • The methods for a model object have been extensively rationalised. I don't think that anything has been removed that anyone is using in their code.
  • The parameters passed as a list user are validated and providing additional parameters is an error

@codecov
Copy link

codecov bot commented Mar 18, 2019

Codecov Report

Merging #156 into master will increase coverage by 0.69%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #156      +/-   ##
========================================
+ Coverage    99.3%   100%   +0.69%     
========================================
  Files          22     37      +15     
  Lines        3592   4388     +796     
========================================
+ Hits         3567   4388     +821     
+ Misses         25      0      -25
Impacted Files Coverage Δ
R/common.R 100% <100%> (ø) ⬆️
R/generate_r_support.R 100% <100%> (ø)
R/generate_c_equation.R 100% <100%> (ø)
R/generate_r_utils.R 100% <100%> (ø)
R/support.R 100% <100%> (ø)
R/ir_parse_config.R 100% <100%> (ø)
R/generate_c_class.R 100% <100%> (ø)
R/ir_parse_error.R 100% <100%> (ø)
R/ir_validate.R 100% <100%> (ø)
R/dependencies.R 100% <100%> (ø) ⬆️
... and 58 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45b801a...c672aa2. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 18, 2019

Codecov Report

Merging #156 into master will increase coverage by 0.69%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #156      +/-   ##
========================================
+ Coverage    99.3%   100%   +0.69%     
========================================
  Files          22     38      +16     
  Lines        3591   4455     +864     
========================================
+ Hits         3566   4455     +889     
+ Misses         25      0      -25
Impacted Files Coverage Δ
R/support.R 100% <100%> (ø)
R/ir_parse_config.R 100% <100%> (ø)
R/generate_c_class.R 100% <100%> (ø)
R/ir_parse_error.R 100% <100%> (ø)
R/dependencies.R 100% <100%> (ø) ⬆️
R/generate_r_equation.R 100% <100%> (ø)
R/ring_cache.R 100% <100%> (ø)
R/generate_r_sexp.R 100% <100%> (ø)
R/odin_validate.R 100% <100%> (ø)
R/ir_parse.R 100% <100%> (ø)
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68fce2f...bef4b4e. Read the comment docs.

@richfitz
Copy link
Member Author

richfitz commented Mar 18, 2019

@codecov-io
Copy link

Codecov Report

Merging #156 into master will increase coverage by 0.69%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #156      +/-   ##
========================================
+ Coverage    99.3%   100%   +0.69%     
========================================
  Files          22     38      +16     
  Lines        3591   4458     +867     
========================================
+ Hits         3566   4458     +892     
+ Misses         25      0      -25
Impacted Files Coverage Δ
R/support.R 100% <100%> (ø)
R/ir_parse_config.R 100% <100%> (ø)
R/generate_c_class.R 100% <100%> (ø)
R/ir_parse_error.R 100% <100%> (ø)
R/dependencies.R 100% <100%> (ø) ⬆️
R/generate_r_equation.R 100% <100%> (ø)
R/ring_cache.R 100% <100%> (ø)
R/generate_r_sexp.R 100% <100%> (ø)
R/odin_validate.R 100% <100%> (ø)
R/ir_parse.R 100% <100%> (ø)
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68fce2f...629249c. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Mar 19, 2019

Codecov Report

Merging #156 into master will increase coverage by 0.69%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #156      +/-   ##
========================================
+ Coverage    99.3%   100%   +0.69%     
========================================
  Files          22     38      +16     
  Lines        3591   4474     +883     
========================================
+ Hits         3566   4474     +908     
+ Misses         25      0      -25
Impacted Files Coverage Δ
R/support.R 100% <100%> (ø)
R/ir_parse_config.R 100% <100%> (ø)
R/generate_c_class.R 100% <100%> (ø)
R/ir_parse_error.R 100% <100%> (ø)
R/dependencies.R 100% <100%> (ø) ⬆️
R/generate_r_equation.R 100% <100%> (ø)
R/ring_cache.R 100% <100%> (ø)
R/generate_r_sexp.R 100% <100%> (ø)
R/odin_validate.R 100% <100%> (ø)
R/ir_parse.R 100% <100%> (ø)
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68fce2f...f006aea. Read the comment docs.

@richfitz richfitz merged commit 1bae83c into master Apr 8, 2019
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.

None yet

2 participants