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

Well-Definedness Predicate for Morphisms #150

Merged
merged 12 commits into from
Aug 29, 2023
Merged

Well-Definedness Predicate for Morphisms #150

merged 12 commits into from
Aug 29, 2023

Conversation

agureev
Copy link
Collaborator

@agureev agureev commented Aug 29, 2023

Introduces a well-defp-cat function to Geb and SeqN which takes in a
morphism in the appropriate category and either gives true if the
morphism is well-defined or produces an error message pointing to the
point at which the morphism fails to be well-defined, e.g. appropriate
domains and codomains do not coincide for composition of morphisms.

agureev and others added 12 commits August 29, 2023 17:19
Adds two new constrictors to the VampIR spec, allowing for making of
the empty bracket used for induction on lists and of the curly
brackets for function specification.
Adds a new primitive operation of conditional division to the VampIR
spec. The primitive stands for the VampIR operation which is capable
of dividing by 0, producing 0.
Upgrade the Vamp-IR package to include basic functions of the library
such as checking whether something is zero, checking whether a number
is negative etc. Alongside that, arithmetic operations with appropriate range
checks are introduced in order to be used in the upgraded pipeline
which will allow for the compilation of natural number functions and
predicates of fixed bitwidth.
Upgrades the standard library needed to compile JuvixCore functions
containing natural numbers functions and predicates.
Introduces a new category SeqN with appropriate API alongside with
the compilation of it to appropriate Vamp-IR code. SeqN can be
thought of as a category of finite sequences of natural numbers
with morphisms from (x1,...,xn) to (y1,...,ym) being Vamp-IR
functions taking in n entries of sizes x1 to xn and spitting out
m outputs of sizes y1 to ym.
Makes the so-eval function into a generic function in order to be
compatible with further Geb extensions.
Upgrades the pipeline to now support compiling to Vamp-IR through
SeqN. That includes adding natural number support for STLC, adding
natural numbers in a Geb extension and subsequently upgrading
appropriate compilation steps with a new pass from Geb to SeqN.
1) Upgrades gapply for Geb to allow interpetation of natural numbers
extension morphisms whose inputs will be lists of natural
numbers.

2) Adds gapply for SeqN, computing appropriate natural number inputs.
Updates test files to include interpretations of compiled STLC code in
SeqN and other individual tests for interpreters in Geb and SeqN.
Introduces a well-defp-cat function to Geb and SeqN which takes in a
morphism in the appropriate category and either gives true if the
morphism is well-defined or produces an error message pointing to the
point at which the moprhism fails to be well-defined, e.g. appropriate
domains and codomains do not coincide for composition of morphisms.
@mariari mariari merged commit e631a2b into main Aug 29, 2023
@mariari mariari deleted the artem/well-defp branch August 29, 2023 20:20
@agureev agureev restored the artem/well-defp branch October 10, 2023 10:13
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