GithubHelp home page GithubHelp logo

Bug in phi-calculus parser about eo HOT 9 CLOSED

maxonfjvipon avatar maxonfjvipon commented on August 16, 2024
Bug in phi-calculus parser

from eo.

Comments (9)

yegor256 avatar yegor256 commented on August 16, 2024 1

@rultor release, tag is 0.35.9

from eo.

maxonfjvipon avatar maxonfjvipon commented on August 16, 2024

After parsing this phi:

{
  ⟦
    test ↦ ⟦
      α1 ↦ ⟦⟧.plus(
        α0 ↦ Φ.org.eolang.int
      )
    ⟧
  ⟧
}

we get the next XMIR:

<program dob="2023-03-19T00:00:00"
         name="main"
         revision="1234567"
         time="2024-03-08T08:51:26.339569Z"
         version="0.0-SNAPSHOT"><!--This is XMIR - a dialect of XML, which is used to present a parsed EO program. For more information please visit https://news.eolang.org/2022-11-25-xmir-guide.html-->
   <listing>{
  ⟦
    test ↦ ⟦
      α1 ↦ ⟦⟧.plus(
        α0 ↦ Φ.org.eolang.int
      )
    ⟧
  ⟧
}</listing>
   <errors/>
   <sheets/>
   <license/>
   <metas/>
   <objects ms="4">
      <o line="3" pos="4">
         <o abstract="" line="4" name="1" pos="6">
            <o base=".plus" line="4" method="" name="test" pos="13">
               <o base="Q" line="5" pos="8"/>
               <o base=".org" line="5" method="" pos="14"/>
               <o base=".eolang" line="5" method="" pos="18"/>
               <o as="0" base=".int" line="5" method="" pos="25"/>
            </o>
         </o>
      </o>
   </objects>
</program>

It's definitely wrong.

I guess the main problem here is in parsing dispatch after formation.

from eo.

maxonfjvipon avatar maxonfjvipon commented on August 16, 2024

@yegor256 let's make a new release with tag 0.35.9

from eo.

rultor avatar rultor commented on August 16, 2024

@rultor release, tag is 0.35.9

@yegor256 OK, I will release it now. Please check the progress here

from eo.

rultor avatar rultor commented on August 16, 2024

@rultor release, tag is 0.35.9

@yegor256 Done! FYI, the full log is here (took me 17min)

from eo.

maxonfjvipon avatar maxonfjvipon commented on August 16, 2024

@deemp I think the bug is fixed. Please use --parser=0.35.9 in your pipeline

from eo.

deemp avatar deemp commented on August 16, 2024

@maxonfjvipon, bool-tests still fail. Have you tested the fixes on eo-runtime tests? Are you going to test your fixes on eo-runtime tests?

I made #2929 that allows to test phi -> unphi on a subset of eo-runtime tests. Do you need my assistance in configuring the tests?

Error:

Test EO without normalization

Warning: JAVA_HOME environment variable is not set.
EO objects registered in .eoc/eo-foreign.json
Assembling into .eoc
Warning: JAVA_HOME environment variable is not set.
[ERROR] Failed to parse '/home/eyjafjallajokull/Desktop/gh/normalizer/pipeline/eo-not-normalized/bool-tests.eo:1207': [1207:10] no viable alternative at input '# This is the default 64+ symbols comment in front of named abstract object.\n[] > iterating-tuple-with-while-without-body-multiple\n  INTQ\n  .org\n  .eolang\n  .tuple > arr\n    INTQ\n    .org\n    .eolang\n    .tuple:0\n      INTQ\n      .org\n      .eolang\n      .tuple:0\n        INTQ\n        .org\n        .eolang\n        .tuple:0\n          INTQ\n          .org\n          .eolang\n          .tuple\n          .empty:0\n          Q\n          .org\n          .eolang\n          .int:1\n            INTQ\n            .org\n            .eolang\n            .bytes:0\n              INT00-00-00-00-00-00-00-01\n        EXPONENTEXPONENTEXPONENTQ\n        .org\n        .eolang\n        .int:1\n          INTQ\n          .org\n          .eolang\n          .bytes:0\n            INT00-00-00-00-00-00-00-01\n      EXPONENTEXPONENTEXPONENTQ\n      .org\n      .eolang\n      .int:1\n        INTQ\n        .org\n        .eolang\n        .bytes:0\n          INT00-00-00-00-00-00-00-01\n    EXPONENTEXPONENTEXPONENTQ\n    .org\n    .eolang\n    .int:1\n      INTQ\n      .org\n      .eolang\n      .bytes:0\n        INT00-00-00-00-00-00-00-01\n  EXPONENTEXPONENTEXPONENTQ\n  .org\n  .eolang\n  .memory > iter\n    INTQ\n    .org\n    .eolang\n    .int:0\n      INTQ\n      .org\n      .eolang\n      .bytes:0\n        INT00-00-00-00-00-00-00-00\n  EXPONENTEXPONENTEXPONENTQ\n  .org\n  .eolang\n  .memory > acc\n    INTQ\n    .org\n    .eolang\n    .int:0\n      INTQ\n      .org\n      .eolang\n      .bytes:0\n        INT00-00-00-00-00-00-00-00\n  EXPONENTEXPONENTEXPONENT$\n  .arr\n  .length > max\n  Q\n  .org\n  .eolang\n  .seq > @\n    INTQ\n    .org\n    .eolang\n    .tuple:0\n      INTQ\n      .org\n      .eolang\n      .tuple:0\n        INTQ\n        .org\n        .eolang\n        .tuple\n        .empty:0\n        []\n          ': "        []"
[ERROR] net.sf.saxon.style.XSLMessage@46c8a1b9: This transformation must be applied only after you remove @method attributes from objects, using 'wrap-method-calls.xsl'
[ERROR] #fatalError(): Processing terminated by xsl:message at line 82 in set-locators.xsl; SystemID: file:///org/eolang/parser/set-locators.xsl; Line#: 82; Column#: 36
[ERROR] Processing terminated by xsl:message at line 82 in set-locators.xsl
[ERROR] 'org.eolang.maven.ShakeMojo@c25cc5a' execution failed
[ERROR] Processing terminated by xsl:message at line 82 in set-locators.xsl
[ERROR] Failed to execute goal org.eolang:eo-maven-plugin:0.35.9:assemble (default-cli) on project eoc: 'org.eolang.maven.AssembleMojo@43aeb5e0' execution failed: java.lang.IllegalStateException: org.apache.maven.plugin.MojoFailureException: 'org.eolang.maven.ShakeMojo@c25cc5a' execution failed: java.io.UncheckedIOException: java.io.IOException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Failed to transform by net.sf.saxon.jaxp.TransformerImpl: Processing terminated by xsl:message at line 82 in set-locators.xsl; SystemID: file:///org/eolang/parser/set-locators.xsl; Line#: 82; Column#: 36 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command "/home/eyjafjallajokull/Desktop/gh/normalizer/node_modules/eolang/mvnw/mvnw eo:assemble -Deo.version=0.35.9 -Deo.hash=130afdd1456a0cbafd52aee8d7bc612e1faac547 --quiet -Deo.sourcesDir=/home/eyjafjallajokull/Desktop/gh/normalizer/pipeline/eo-not-normalized -Deo.targetDir=/home/eyjafjallajokull/Desktop/gh/normalizer/pipeline/eo-not-normalized/.eoc -Deo.outputDir=/home/eyjafjallajokull/Desktop/gh/normalizer/pipeline/eo-not-normalized/.eoc/classes -Deo.generatedDir=/home/eyjafjallajokull/Desktop/gh/normalizer/pipeline/eo-not-normalized/.eoc/generated-sources -Deo.placed=/home/eyjafjallajokull/Desktop/gh/normalizer/pipeline/eo-not-normalized/.eoc/eo-placed.csv -Deo.placedFormat=csv --batch-mode --color=never --update-snapshots --fail-fast --strict-checksums" exited with #1 code

from eo.

maxonfjvipon avatar maxonfjvipon commented on August 16, 2024

phi and unphi goals work fine. But EO grammar does not support the one specific case - vertical method after formation:

[]
.method

It seems we should allow such syntax, because there's no other way we can print XMIR to EO in straight notation

from eo.

maxonfjvipon avatar maxonfjvipon commented on August 16, 2024

@deemp I'm closing this one, because there's no bug anymore. Follow one: #2943

from eo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.