Skip to content

Enhancement for Source 3 Non-Det (adds loops, randomized amb, minor fixes) #594

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

Merged
merged 12 commits into from
May 2, 2020

Conversation

anubh-v
Copy link
Contributor

@anubh-v anubh-v commented Apr 30, 2020

This PR adds the following, in completion of our reach goals:

  • Adds while loops & for loops
  • Adds a new primitive ambR which functions like amb, but chooses values pseudo randomly (using math.random) rather than sequentially (from left to right).
  • Adds some minor bugfixes and improvements:
    • Fixes a bug in implementation of arrays
    • Catches stackoverflow errors and display them to the user
    • For the Source 3 Non-Det node REPL, displays a user friendly message when all possible values of a program have been generated.

The markdown documentation and language specs have been updated to account for the changes.

arsalan0c and others added 5 commits April 28, 2020 13:14
* fix bug: yield new array for array expression
* add user friendly REPL message
Adds the ambR operator which functions similarly to amb
but makes choices randomly instead of sequentially.

Also adds landing page and library documentation for
the operator, and adds this operator into the specs.
This PR adds support for while loops, including break,
continue and return statements in the loop body.

It also tweaks the scheduler so that stackoverflow errors
are captured and displayed to the user.

Co-authored-by: anubh-v <[email protected]>
@coveralls
Copy link

coveralls commented Apr 30, 2020

Pull Request Test Coverage Report for Build 3191

  • 80 of 80 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 83.521%

Totals Coverage Status
Change from base Build 3190: 0.1%
Covered Lines: 6465
Relevant Lines: 7455

💛 - Coveralls

@anubh-v anubh-v changed the title [WIP] Second upgrade for Source 3 Non-Det (adds loops, randomized amb, minor fixes) [WIP] Enhancement for Source 3 Non-Det (adds loops, randomized amb, minor fixes) Apr 30, 2020
anubh-v and others added 2 commits May 1, 2020 20:43
This PR adds support for for loops, including break,
continue and return statements in the loop body.
Co-authored-by: Anubhav <[email protected]>
arsalan0c and others added 2 commits May 2, 2020 00:10
* Remove unhelpful comment

* Fix spelling in comment
@anubh-v anubh-v marked this pull request as ready for review May 1, 2020 16:39
@anubh-v anubh-v changed the title [WIP] Enhancement for Source 3 Non-Det (adds loops, randomized amb, minor fixes) Enhancement for Source 3 Non-Det (adds loops, randomized amb, minor fixes) May 1, 2020
@anubh-v anubh-v requested a review from martin-henz May 1, 2020 16:40
@martin-henz martin-henz merged commit 8caa930 into source-academy:master May 2, 2020
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.

4 participants