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

the @abstract attribute seems to be redundant #3529

Closed
yegor256 opened this issue Nov 23, 2024 · 15 comments · Fixed by #3599
Closed

the @abstract attribute seems to be redundant #3529

yegor256 opened this issue Nov 23, 2024 · 15 comments · Fixed by #3599
Assignees

Comments

@yegor256
Copy link
Member

We have a function eo:abstract and the @abstract attribute. It seems that the attribute is redundant: we can get rid of it and only live with the function.

@yegor256
Copy link
Member Author

@maxonfjvipon WDYT?

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Nov 23, 2024

@yegor256 the function checks the presence of @abstract attribute.

<xsl:function name="eo:abstract" as="xs:boolean">
  <xsl:param name="o" as="element()"/>
  <xsl:sequence select="not(exists($o/@base)) and (exists($o/o) or $o/@atom or $o/@abstract)"/>
</xsl:function>

I'm not sure we can remove the attribute because there's no unique combination of other mandatory attributes like @base or @name which may replace @abstract

@maxonfjvipon
Copy link
Member

@yegor256 or no. Actually if object does not have @base - it's already abstract. It seems that it's enough. WDYT?

@yegor256
Copy link
Member Author

@maxonfjvipon yes, seems to be correct: no @base means "being abstract" or "being an atom". Maybe we can just simplify this to:

<xsl:sequence select="not(exists($o/@base)) and (exists($o/o) or $o/@atom)"/>

@maxonfjvipon
Copy link
Member

@yegor256 even exists($o/o) is not necessary because the object can be empty

@yegor256
Copy link
Member Author

@maxonfjvipon let's get rid of it!

@maxonfjvipon
Copy link
Member

@yegor256 the problem appeared: void attributes also don't have @base and have only @name attribute.

[x] > a
  [] > y

Here at the level of XMIR there's no difference between x and y, they both looks the same:

<o line="6" name="x" pos="1"/>
<o line="8" name="y" pos="2"/>

@yegor256
Copy link
Member Author

@maxonfjvipon both of them are formations, aren't they? In our current XMIR semantic, the @abstract attribute means "this is formation", isn't it?

@maxonfjvipon
Copy link
Member

@yegor256 yes, @abstract means formation, but void attribute is not formation

@yegor256
Copy link
Member Author

@maxonfjvipon maybe let's do it this way (more compliant with the calculus):

<o line="6" name="x" pos="1" base="∅"/>
<o line="8" name="y" pos="2"/>

@maxonfjvipon
Copy link
Member

@yegor256 this may work

maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Nov 25, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Nov 25, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Nov 25, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Nov 25, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Nov 25, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Nov 25, 2024
@yegor256 yegor256 changed the title the @abstract attribute seems to redundant the @abstract attribute seems to be redundant Nov 27, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 3, 2024
yegor256 added a commit that referenced this issue Dec 4, 2024
@0pdd
Copy link

0pdd commented Dec 4, 2024

@yegor256 2 puzzles #3600, #3601 are still not solved.

@yegor256
Copy link
Member Author

yegor256 commented Dec 4, 2024

@rultor release, tag is 0.46.0

@rultor
Copy link
Contributor

rultor commented Dec 4, 2024

@rultor release, tag is 0.46.0

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

@rultor
Copy link
Contributor

rultor commented Dec 4, 2024

@rultor release, tag is 0.46.0

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

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 a pull request may close this issue.

4 participants