objectionary / eo

EOLANG, an Experimental Pure Object-Oriented Programming Language Based on 𝜑-calculus
https://www.eolang.org
MIT License
1.01k stars 126 forks source link

`eoc phi` translates `int.eo` in a wrong way #3201

Closed deemp closed 4 months ago

deemp commented 4 months ago

@maxonfjvipon, @yegor256

For eoc 0.38.0, the neg object is translated to PHI in a wrong way.

The neg object in EO:

https://github.com/objectionary/eo/blob/312daf1e0e7735bbcd3d52e7c2c14ca633883c77/eo-runtime/src/main/eo/org/eolang/int.eo#L62-L63

The neg object in PHI (link).

Expected neg object in PHI:

neg ↦ ⟦
  φ ↦ ξ.ρ.times(
    α0 ↦ Φ.org.eolang.int(
      α0 ↦ Φ.org.eolang.bytes(
        Δ ⤍ FF-FF-FF-FF-FF-FF-FF-FF
      )
    )
  )
⟧,
github-actions[bot] commented 4 months ago

@deemp thanks for the report, here is a feedback:

Problems

I would recommend including a clear and concise title for quick identification of the bug.

Please fix the bug report in order it to get resolved faster. Analyzed with gpt-4

maxonfjvipon commented 4 months ago

@deemp it's not wrong, it's just one more way to convert this particular object to PHI

maxonfjvipon commented 4 months ago

@deemp since we're inside org.eolang.int.times to get org.eolang.int we can do:

  1. Φ.org.eolang.int
  2. ξ.ρ.ρ.int:
    • ξ -> org.eolang.int.times
    • ξ.ρ -> org.eolang.int
    • ξ.ρ.ρ -> org.eolang
    • ξ.ρ.ρ.int -> org.eolang.int
deemp commented 4 months ago

OK, thanks for clarifications.