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

Proto-Function definitions and function spaces, with a smaller example #2700

Merged
merged 19 commits into from
Jul 20, 2021

Conversation

balacij
Copy link
Collaborator

@balacij balacij commented Jul 19, 2021

Builds on #2696
Closes #2418
Relates to #2554
Contributes to #2371

  • Creates FuncDefn containers -- prototype function definitions, not yet used in code generation
    • First-order functions, using curried inputs
  • Creates FunctionalModel ModelKinds -- a new variant of models for defining functions
  • Convert DblPendulum's angular displacement IM into a FunctionalModel as a prototype

Leaving this as a draft because I'm unsure if we want named arguments in Expr/Function definitions.

Should we work on code generation next while converting more models? I suspect that we'll need to carry a bit more information about the inputs in the FuncDefns.

Copy link
Owner

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I really expected more changes to Expr and fewer the chunks for adding functions?

code/drasil-lang/Language/Drasil/Chunk/Function.hs Outdated Show resolved Hide resolved
code/drasil-lang/Language/Drasil/Space.hs Outdated Show resolved Hide resolved
code/drasil-lang/Language/Drasil/Space.hs Outdated Show resolved Hide resolved
code/drasil-lang/Language/Drasil/Space.hs Outdated Show resolved Hide resolved
Copy link
Owner

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good now.

@balacij balacij marked this pull request as ready for review July 20, 2021 20:55
@balacij
Copy link
Collaborator Author

balacij commented Jul 20, 2021

Thank you!

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.

Showing "f(x,y,z)"-like forms on the left-hand side of QDefinition equations
2 participants