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

Introduce CapJitTypedExpression #1234

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

zickgraf
Copy link
Member

Fixes #1213.

@mohamed-barakat CapJitTypedExpression allows to attach a data type to any expression, in particular empty lists and functions which both cannot infer their data type without context information. See the application in AdditiveClosure for an example for how to use this. Of course we can also add convenience methods like CapJitFunctionWithDomainDataType or similar later on.

I want to make sure that this works in principle, so feel free to play around with this. Currently, lots of warnings about empty lists are displayed which can be ignored for now.

@mohamed-barakat
Copy link
Member

Wonderful, thank you very much.

@zickgraf zickgraf force-pushed the CapJitTypedExpression branch from 7d92674 to b365f5e Compare February 9, 2023 17:20
@zickgraf zickgraf force-pushed the CapJitTypedExpression branch 2 times, most recently from 4485f6b to 521d432 Compare May 3, 2023 12:15
@zickgraf
Copy link
Member Author

zickgraf commented May 3, 2023

@mohamed-barakat I have pushed an update. It documents that only literal functions and global variables pointing to a function are allowed as second argument of CapJitTypedExpression and actually adds support for the latter. It also adds an important warning:

https://github.com/homalg-project/CAP_project/compare/4485f6b31f7f7c5161db883719ccdf9453fcb900..521d432e5f370ad6d1779f176af3b4c45c0c0765#diff-a92667676af41741a09a3231276c244f2e85db0d61ecb1a6d581d23a87fca0e5R211-R212

@zickgraf
Copy link
Member Author

The force-push removes a superfluous new line and rebases onto master, so nothing really new.

@zickgraf zickgraf force-pushed the CapJitTypedExpression branch from 63fac5c to 24d3f93 Compare September 27, 2023 09:03
@zickgraf zickgraf force-pushed the CapJitTypedExpression branch 3 times, most recently from 058b77b to 1a3fca2 Compare December 6, 2023 10:20
@zickgraf
Copy link
Member Author

zickgraf commented Dec 6, 2023

I now have a concrete application for this PR in the context of using CompilerForCAP as a proof assistant. @mohamed-barakat Is it okay for you if I merge this PR soon? It will probably require some adjustments at places where empty lists occur.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f701aff) 80.90% compared to head (af2ea35) 80.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1234      +/-   ##
==========================================
+ Coverage   80.90%   80.94%   +0.03%     
==========================================
  Files         489      489              
  Lines       62511    62578      +67     
==========================================
+ Hits        50577    50653      +76     
+ Misses      11934    11925       -9     
Flag Coverage Δ
ActionsForCAP 64.09% <ø> (ø)
AttributeCategoryForCAP 88.88% <ø> (ø)
CAP 84.54% <100.00%> (+<0.01%) ⬆️
CartesianCategories 93.33% <ø> (ø)
CompilerForCAP 94.33% <100.00%> (+0.26%) ⬆️
ComplexesAndFilteredObjectsForCAP 73.60% <ø> (ø)
FreydCategoriesForCAP 81.31% <100.00%> (ø)
GeneralizedMorphismsForCAP 61.60% <ø> (ø)
GradedModulePresentationsForCAP 44.58% <ø> (ø)
GroupRepresentationsForCAP 72.05% <ø> (ø)
HomologicalAlgebraForCAP 73.21% <ø> (ø)
InternalExteriorAlgebraForCAP 93.08% <ø> (ø)
LinearAlgebraForCAP 66.54% <ø> (ø)
ModulePresentationsForCAP 68.46% <ø> (ø)
ModulesOverLocalRingsForCAP 90.70% <ø> (ø)
MonoidalCategories 90.53% <ø> (ø)
ToricSheaves 21.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mohamed-barakat
Copy link
Member

I now have a concrete application for this PR in the context of using CompilerForCAP as a proof assistant.

Very nice.

@mohamed-barakat Is it okay for you if I merge this PR soon? It will probably require some adjustments at places where empty lists occur.

Yes, please wait until https://github.com/homalg-project/CategoricalTowers/actions/runs/7112784251 passes and the packages are released.

@zickgraf zickgraf force-pushed the CapJitTypedExpression branch 3 times, most recently from 7cf7649 to e11ca11 Compare December 6, 2023 16:05
@zickgraf zickgraf force-pushed the CapJitTypedExpression branch from e11ca11 to af2ea35 Compare December 6, 2023 21:53
@zickgraf zickgraf merged commit 55ad6b4 into homalg-project:master Dec 7, 2023
5 checks passed
@zickgraf zickgraf deleted the CapJitTypedExpression branch December 7, 2023 07:41
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.

CompilerForCAP: Add support for functions with domain
2 participants