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

Native support for non-core evaluation operators #43

Merged
merged 14 commits into from
Jun 10, 2024
Merged

Native support for non-core evaluation operators #43

merged 14 commits into from
Jun 10, 2024

Conversation

ajreynol
Copy link
Member

@ajreynol ajreynol commented Jun 7, 2024

No description provided.

src/literal.cpp Outdated
case Kind::EVAL_GT:
switch (ka)
{
case Kind::NUMERAL:return Literal(args[0]->d_int>args[0]->d_int);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a line break here would improve readability.

user_manual.md Outdated
@@ -489,7 +494,21 @@ Core operators:
- If `t1` is a ground constant or variable, this returns the name of `t1`, i.e. the string corresponding to the symbol it was declared with.
- `(alf.var t1 t2)`
- If `t1` is a string value and `t2` is ground type, this returns the variable whose name is `t1` and whose type is `t2`.

- `(alf.cmp t1 t2)`
- Equivalent to `(alf.is_neg (alf.add (alf.neg (alf.hash t1)) (alf.hash t2)))`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes sense to state here that this defines an (arbitrary) total-order on terms. I guess it might not always correspond to what people expect (e.g. on strings it is not lexicographic order)

@ajreynol ajreynol merged commit e945c5b into main Jun 10, 2024
4 checks passed
@ajreynol ajreynol deleted the alfCompare branch June 10, 2024 14:30
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