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

HE vs ML discrepancy: weird semantic differences "+" and numbers: "+2" as "2" vs "uninterpreted symbol, vanishing results using + on "A", treating (2) the same as 2. #240

Open
zariuq opened this issue Feb 5, 2025 · 0 comments

Comments

@zariuq
Copy link

zariuq commented Feb 5, 2025

Semantics of "+2":

  • HE interprets this as "positive two" whereas ML considers it "+2" as an uninterpreted symbol.

Hyperon Experimental (HE) via metta-repl

> !(+ 2 3)
[5]
> !(+2 3)
[(2 3)]

MeTTaLog (ML) via mettalog --repl

metta+>!(+ 2 3)
[5]

metta+>!(+2 3)
[(+2 3)]

Semantics of + assigned to non-numerals

  • ML eats the result when it should leave the result untouched (or, apparently, reduce the +2).

HE:

> !(+ +2 A)
[(+ 2 A)]

MeTTaLog:

metta+>!(+ 2 A)
;; no-results ;; 
[]

Semantics of evaluating (2)

  • ML treats (2) and (3) like 2 and 3.

HE:

> !(== 2 (2))
[False]

ML:

metta+>!(== 2 (2))
[True]

HE:

> !(+ (2) (3))
[(+ (2) (3))]
> !(+ ((2)) ((3)))
[(+ ((2)) ((3)))]

ML:

metta+>!(+ (2) (3))
[5]

metta+>!(+ ((2)) ((3)))
[(+ ((2)) ((3)))]

@zariuq zariuq changed the title Weird semantic differences between HE and MeTTaLog concerning "+" and numbers: "+2" as "2" vs "uninterpreted symbol, vanishing results using + on "A", treating (2) the same as 2. HE vs ML discrepancy: weird semantic differences "+" and numbers: "+2" as "2" vs "uninterpreted symbol, vanishing results using + on "A", treating (2) the same as 2. Feb 5, 2025
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

No branches or pull requests

1 participant