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

CASL overloading not possible #1767

Open
tillmo opened this issue Aug 10, 2016 · 5 comments
Open

CASL overloading not possible #1767

tillmo opened this issue Aug 10, 2016 · 5 comments

Comments

@tillmo
Copy link
Member

tillmo commented Aug 10, 2016

When I upload

spec Nat =
  sorts Pos < Nat
  ops 1:Pos; 1:Nat
end

I get

The name "1" of the symbol is ambiguous. It is already used for either a axiom or a theorem. The symbol "1" is located at http://develop.ontohub.org/ref/1/sandbox/overload:3.14.

see https://develop.ontohub.org/sandbox/overload

This completely prevents CASL overloading.
Solution: IRIs for symbols should also contain their types.

@tillmo tillmo added this to the improve stability milestone Aug 10, 2016
@eugenk
Copy link
Member

eugenk commented Aug 10, 2016

What format do you propose?

And what do we do if there is a symbol/sentence/mapping/child/etc called like the chosen possibility?

@tillmo
Copy link
Member Author

tillmo commented Aug 10, 2016

I think http://develop.ontohub.org/sandbox/overload//1%3APos is the best way, because symbol names might contain a "-". Note that there can also be symbols with name f:Nat->Nat, and then the ">" probably needs to be coded as well.

If there is another item with the same name, it is an error.

@eugenk
Copy link
Member

eugenk commented Aug 10, 2016

We don't have the information in the XML of Hets to do this. Hets's output is, for example:

    <Symbols>
      <Symbol kind="sort" name="Nat" iri="Nat" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:2.15-2.17">sort Nat</Symbol>
      <Symbol kind="sort" name="Pos" iri="Pos" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:2.9-2.11">sort Pos</Symbol>
      <Symbol kind="op" name="1" iri="1" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:3.14">op 1 : Nat</Symbol>
      <Symbol kind="op" name="1" iri="1" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:3.14">op 1 : Pos</Symbol>
    </Symbols>

what we would like to have is something like:

    <Symbols>
      <Symbol kind="sort" name="Nat" iri="Nat" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:2.15-2.17">sort Nat</Symbol>
      <Symbol kind="sort" name="Pos" iri="Pos" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:2.9-2.11">sort Pos</Symbol>
      <Symbol kind="op" type="Nat" name="1" iri="1" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:3.14">op 1 : Nat</Symbol>
      <Symbol kind="op" type="Pos" name="1" iri="1" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:3.14">op 1 : Pos</Symbol>
    </Symbols>

or

    <Symbols>
      <Symbol kind="sort" name="Nat" iri="Nat" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:2.15-2.17">sort Nat</Symbol>
      <Symbol kind="sort" name="Pos" iri="Pos" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:2.9-2.11">sort Pos</Symbol>
      <Symbol kind="op" name="1:Nat" iri="1" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:3.14">op 1 : Nat</Symbol>
      <Symbol kind="op" name="1:Pos" iri="1" range="/Users/eugen/Work/Ontohub/repos/ontologies/overload.casl:3.14">op 1 : Pos</Symbol>
    </Symbols>

@eugenk
Copy link
Member

eugenk commented Aug 10, 2016

Which output is preferrable?

With name="1:Pos", we also display "1:Pos" in the index page of the symbols.
With type="Pos" name="1", we would add a new database column for the symbols table that contains the generated "locid_name" 1:Pos or we would add a new column for the type.

Do you have other suggestions?

@tillmo
Copy link
Member Author

tillmo commented Aug 10, 2016

I would prefer type="Pos" name="1", because it is more general.

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

2 participants