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

Merge ast and parser from forward #3

Merged
merged 68 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
53844ed
Update poetry configuration
Legotier May 6, 2022
e6a9c16
Add testreport to gitignore
Legotier May 6, 2022
0e4ffaa
Merge new stuff from forward into ast.py
Legotier May 6, 2022
7fbc8bd
Minimal changes to make the tests pass
Legotier May 6, 2022
4fc36c1
Rename float types to real types
Legotier May 6, 2022
c296998
Update docs to include new classes
Legotier May 6, 2022
9d167e3
Use autodata instead of autoclass for union types
Legotier May 6, 2022
7adbe0f
changed workflow to python version 3.9
LKlinke May 10, 2022
7021d76
Enable type aliases for union types in the docs
Legotier May 11, 2022
816dc31
Merge branch 'brand-new' of https://github.com/Philipp15b/probably in…
Legotier May 11, 2022
697e1d1
Remove forward type references in ast.py
Legotier May 11, 2022
b2ede13
resolved dep issues
May 11, 2022
1d5af7a
Disallow edges to None in ControlFlowGraph.to_networkx()
Legotier May 13, 2022
6eb0df9
Merge parser from forward
Legotier May 13, 2022
b8f7cf3
A helpful comment so people don't have to spend hours figuring out wh…
Legotier May 13, 2022
15f59e7
Update test_uniform_checks
Legotier May 13, 2022
9012370
Fix precedence of likelyhood operator
Legotier May 18, 2022
077a5eb
Add test for basic operator precedence
Legotier May 18, 2022
f8b3e08
Revert "Add test for basic operator precedence"
Legotier May 18, 2022
9cc3a75
Add test for basic operator precedence
Legotier May 18, 2022
8833b7f
Test for correct parsing of distributions
Legotier May 18, 2022
3835e4d
Test for using minus with likely
Legotier May 18, 2022
2afe578
Only allow natural numbers and parameters in distribution expressions
Legotier May 18, 2022
7912125
Revert "Only allow natural numbers and parameters in distribution exp…
Legotier May 19, 2022
ce569fb
Minor fixes
Legotier May 20, 2022
c179a25
Revert to older version (2.5) of networkx
Legotier May 20, 2022
5de84e6
Remove test for parser check that is no longer done
Legotier May 20, 2022
a3a3246
Clear parameter dict for every new program that is parsed
Legotier May 20, 2022
fe6feab
Fix almost all pylint problems
Legotier May 20, 2022
017ad52
Split ast module into several files
Legotier May 25, 2022
1bfd89c
I forgot to add the new files to git
Legotier May 25, 2022
9fd0257
Move documentation of ast module to __init__.py
Legotier May 25, 2022
8557c91
Fix pylint cyclic import warnings
Legotier May 25, 2022
e300fd3
Fix mypy errors
Legotier May 25, 2022
b22519b
Update mypy to newer version
Legotier May 25, 2022
9189730
Move Bounds class to types file
Legotier May 25, 2022
6ec6e8a
Move unused import to doctest
Legotier May 27, 2022
5bdf111
Merge typechecker from forward
Legotier May 27, 2022
3e25603
Add tests for some of the typechecking
Legotier May 27, 2022
965da72
Revert "Remove test for parser check that is no longer done"
Legotier May 27, 2022
8404efa
Fix bug in typechecking test
Legotier May 27, 2022
02dc6dd
Remove 'parameters' parameter from Program.from_parse
Legotier May 27, 2022
9943cb9
Remove VarExpr.is_parameter
Legotier May 27, 2022
a1f93d9
Fix unsafe return type of get_type for iid expressions
Legotier Jun 1, 2022
8cc2a56
Prettify linear checks
Legotier Jun 1, 2022
2aa93a3
Fix unsafe default value warning
Legotier Jun 1, 2022
f96efa4
Add some old checks from the parser to the typechecker
Legotier Jun 1, 2022
ecd08e9
Fix precedence of modulo operator
Legotier Jun 2, 2022
476940a
Fix (suppressed) cyclic dependency warnings
Legotier Jun 2, 2022
16e31c4
Fix typechecking for IidSampleExpr
Legotier Jun 2, 2022
5ab560c
Give some binary operators clearer names
Legotier Jun 2, 2022
0da4e94
Replace not_a_variable and add a warning to the typechecker
Legotier Jun 2, 2022
6158b37
Make it more explicit that iid type checking is unsafe
Legotier Jun 2, 2022
7e8c180
Logger warning for typechecking of iid exprs
Legotier Jun 3, 2022
6247646
Update parameter in syntax module
Legotier Jun 3, 2022
bb071e1
Fix warnings
Legotier Jun 3, 2022
579fdf6
Disallow constants in programs in the syntax module
Legotier Jun 3, 2022
0a598c2
Make some variable names (true, false) illegal
Legotier Jun 3, 2022
12167a5
Eliminate true and false from pgcl grammar
Legotier Jun 3, 2022
e606806
Revert "Eliminate true and false from pgcl grammar"
Legotier Jun 8, 2022
4d4c322
Fix error message in check_is_linear_expr
Legotier Jun 8, 2022
21ae331
Add assertion for illegal keyword to constructor of VarExpr
Legotier Jun 8, 2022
f1d923a
Better error message for usage of true or false in plot instructions
Legotier Jun 8, 2022
79991b9
Allow variables in distribution parameters
Legotier Jun 9, 2022
1777e88
Remove program config
Legotier Jun 9, 2022
3af0bf5
Add typecheck for TickInstr and TickExpr
Legotier Jun 9, 2022
2dd1aa3
Auto format
Legotier Jun 9, 2022
a2adf9f
Add format target to makefile
Legotier Jun 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.9
- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
testreport.xml

# Translations
*.mo
Expand Down
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@

# nitpicky emits warnings for all broken links
# nitpicky = True

autodoc_type_aliases = {"Expr" : "probably.pgcl.ast.Expr", "Instr" : "probably.pgcl.ast.Instr", "Type" : "probably.pgcl.ast.Type",
"Decl" : "probably.pgcl.ast.Decl", "DistrExpr" : "probably.pgcl.ast.DistrExpr", "Query" : "probably.pgcl.ast.Query"}
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ ignore_missing_imports = True

[mypy-networkx.*]
ignore_missing_imports = True

[mypy-click.*]
ignore_missing_imports = True
Loading