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

Update Stan manual for stanc3 with changes #302

Closed
seantalts opened this issue Sep 23, 2019 · 13 comments
Closed

Update Stan manual for stanc3 with changes #302

seantalts opened this issue Sep 23, 2019 · 13 comments
Assignees

Comments

@seantalts
Copy link
Member

Changes are listed here:
https://github.com/stan-dev/stanc3/wiki/changes-from-stanc2

@seantalts seantalts added this to the initial release milestone Sep 23, 2019
@seantalts
Copy link
Member Author

@VMatthijs would you mind tackling this one? I think you're much more familiar with the specific changes and the manual since you did all of the implementation :)

@seantalts
Copy link
Member Author

Hey @VMatthijs, happy new year! Do you think you might be able to get to this in the next week or two? We'll need this in before we can release the compiler and the next release is Jan 18.

@VMatthijs
Copy link
Member

Should this go in the stan-dev/docs repo? You probably know as much as I do, as I'd just be working from the list under the wiki. I will try to find time, but can't promise anything I'm afraid as things are a bit hectic.

@seantalts
Copy link
Member Author

Yep, the Stan manual lives in the docs repo now. I think that wiki is all stuff that you wrote based on discrepancies or unspecified behavior you had previously discovered between the old compiler and the manual, so I think you'd have a more efficient time of it if you can spare time! If not I can use the excuse to learn more about that side of things.

@VMatthijs
Copy link
Member

I just went through the wiki and I think the following are the only things that need changing in the manual (as the rest were just bug fixes):

  • variable declarations and statements can now be mixed in an arbitrary order (before variable declarations had to precede statements);
  • target, lower, upper, offset, multiplier are now reserved keywords and no longer be used as variable names;
  • there now is a pretty printing / formatting mode in stanc (but I'm not even sure if it should go in a doc and if so which one); there are also a bunch of other new flags to stanc for stuff like debugging;

On a related note, I expect rstanarm and perhaps brms to break as they were exploiting some bugs/undesired behaviour in stanc2. In particular, I know that rstanarm was producing some models missing semi-colons in places where they should be required and it was using lower and upper etc as variable names.

@seantalts
Copy link
Member Author

Oh awesome, thank you! Tagging @bgoodri and @paul-buerkner

@VMatthijs
Copy link
Member

Ah, actually, perhaps one more thing needs changing, though I am not actually 100% sure this behaviour is different from stanc2. Perhaps, @bgoodri can weigh in on this:

  • stanc3 allows recursive includes: that is a.stan includes b.stan includes c.stan; the only thing it disallows are circular includes: that is a.stan includes b.stan includes c.stan includes a.stan;

Based on the manual it seemed like stanc2 would not allow recursive includes. However, I almost find that hard to believe.

@bgoodri
Copy link

bgoodri commented Jan 5, 2020 via email

@bob-carpenter
Copy link
Contributor

bob-carpenter commented Jan 5, 2020 via email

@bob-carpenter
Copy link
Contributor

bob-carpenter commented Jan 5, 2020 via email

@bob-carpenter
Copy link
Contributor

bob-carpenter commented Jan 5, 2020 via email

@bob-carpenter
Copy link
Contributor

bob-carpenter commented Jan 5, 2020 via email

@bgoodri
Copy link

bgoodri commented Jan 6, 2020

What happens to error messages under that scheme?

Assuming the #include statement is valid (hence why we need to permit quotation marks), then the C preprocessor will make a monolithic Stan program after reconciling the included files. So, the line numbers and whatnot of syntax errors would be relative to the monolithic file. I'll see what I can do with it under the RStudio API.

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

No branches or pull requests

5 participants