-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add set literals and set find (#687)
Summary of changes: added DomainSet to the Domain enum created an expression to represent sets added parsing for sets of literals added parsing for finding sets of both bool and int type added 'display' method for set domains created test file under tests/integration/deedee/input.essence --- * added functionality for statements like: letting a be 3 * Revert "added functionality for statements like: letting a be 3" This reverts commit 3c7c407. * sorry * letting sets works now with hardcoded sets, and finding sets without any fancy parameters * added functionality for statements like: letting a be 3 * Revert "added functionality for statements like: letting a be 3" This reverts commit 3c7c407. * i am confused * merged again * final commit before pr * now set expression is a literal instead of a vector of expressions * changed set attributes to match the ones in conjure, and parsing sets. Right now we can only add Atomic expressions to a set, but adding other expressions will be easy. will work on that next, this is like a POC. Also, need to work on how to display sets that contain different types of expressions, which should be easy as well * fixed CI issues * added expected files * nitpicking * really dont understand why I needed to beautify the code to this degree but hey * i am losing my mind * i give up * fix submodule
- Loading branch information
Showing
16 changed files
with
282 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
enable_native_impl=false | ||
enable_rewriter_impl=false | ||
parse_model_default=true | ||
enable_native_parser=false | ||
apply_rewrite_rules=false | ||
enable_extra_validation=false | ||
solve_with_minion=false | ||
compare_solver_solutions=false | ||
validate_rule_traces=false |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
letting a be {1,2,3} |
83 changes: 83 additions & 0 deletions
83
conjure_oxide/tests/integration/deedee/input.expected-parse.serialised.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"constraints": { | ||
"Root": [ | ||
{ | ||
"clean": false, | ||
"etype": null | ||
}, | ||
[] | ||
] | ||
}, | ||
"dominance": null, | ||
"symbols": { | ||
"id": 0, | ||
"next_machine_name": 0, | ||
"parent": null, | ||
"table": [ | ||
[ | ||
{ | ||
"UserName": "a" | ||
}, | ||
{ | ||
"id": 286, | ||
"kind": { | ||
"ValueLetting": { | ||
"AbstractLiteral": [ | ||
{ | ||
"clean": false, | ||
"etype": null | ||
}, | ||
{ | ||
"Set": [ | ||
{ | ||
"Atomic": [ | ||
{ | ||
"clean": false, | ||
"etype": null | ||
}, | ||
{ | ||
"Literal": { | ||
"Int": 1 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"Atomic": [ | ||
{ | ||
"clean": false, | ||
"etype": null | ||
}, | ||
{ | ||
"Literal": { | ||
"Int": 2 | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"Atomic": [ | ||
{ | ||
"clean": false, | ||
"etype": null | ||
}, | ||
{ | ||
"Literal": { | ||
"Int": 3 | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"name": { | ||
"UserName": "a" | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.