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

Code structure #25

Merged
merged 12 commits into from
Oct 28, 2023
Merged

Code structure #25

merged 12 commits into from
Oct 28, 2023

Conversation

lixitrixi
Copy link
Contributor

Here I begin defining a possible project structure.

Basic ideas (adapted from conversations with Nik today and #23)

  1. Solver-independent data types specific to Conjure are defined in src/common, such as ast
  2. Conjure-independent data types, like the solver interfaces, are included outside of the project's source as they can technically be their own crates
  3. We will have a "Tailor" or "TailoredSolver" type which accepts a Conjure Model and returns a Conjure Solution. We'll refine the the Solution class (e.g. it could support lazy evaluation), but the important point is that everything solver-dependent is handled through one choke point, above which everything is general Conjure stuff

@ozgurakgun
Copy link
Contributor

I don't know why this rustfmt thing is failing by the way. It's definitely not your fault...

@ozgurakgun
Copy link
Contributor

did you sync your fork before the last commit? I still see RefCells in there.

@lixitrixi
Copy link
Contributor Author

did you sync your fork before the last commit? I still see RefCells in there.

I just pushed more often than I should have haha

@lixitrixi
Copy link
Contributor Author

This should now be done I believe; anything to add @ozgurakgun ?

@lixitrixi lixitrixi marked this pull request as ready for review October 26, 2023 21:52
@ozgurakgun
Copy link
Contributor

did you sync your fork before the last commit? I still see RefCells in there.

I just pushed more often than I should have haha

kein problem, committing&pushing often is a good idea!

@ozgurakgun
Copy link
Contributor

turning the old ugly mainX functions into tests maybe?

@lixitrixi
Copy link
Contributor Author

turning the old ugly mainX functions into tests maybe?

Word! Will do before this is merged.

@lixitrixi lixitrixi marked this pull request as draft October 26, 2023 22:05
@lixitrixi lixitrixi marked this pull request as ready for review October 26, 2023 23:12
@lixitrixi
Copy link
Contributor Author

I've moved the integration tests Oz wrote to model- and rewrite-testing directories runnable by cargo test. As we write more permanent AST simplification methods we will be able to test those instead of using helper functions.

@lixitrixi
Copy link
Contributor Author

@ozgurakgun The format tests still seem to be failing after merging

@ozgurakgun ozgurakgun merged commit 41f863a into conjure-cp:main Oct 28, 2023
1 check failed
@lixitrixi lixitrixi deleted the code-structure branch October 30, 2023 13:06
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.

2 participants