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

instantiation of formal parameters with only one symbol (first try to see how this would work) #1849

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mcodescu
Copy link
Collaborator

Not intended to merge, but pull request shows diff better.

@tillmo
Copy link
Contributor

tillmo commented Jun 4, 2018

I have tried this extensively with 29 DOL files that BKB has provided. It mostly works, with two exceptions. The first one is: for compound ids, it is not possible to omit the symbol kind. Consider e.g.

logic OWL

spec S[Class: X] =
 Class: D SubClassOf: X
end

spec SC = S[C[X]]
end

Then C[X] is always recognized as an instantiation of a generic spec, not as a compound id.

@mcodescu
Copy link
Collaborator Author

mcodescu commented Jun 8, 2018

I made your example work (not an elegant solution, but it goes through). If other of the test files involving compound identifiers do not work, please let me know.

@tillmo
Copy link
Contributor

tillmo commented Jun 9, 2018

Good, now more things go through!
However, the following does not work (probably due to the nesting):

logic OWL
ontology A [ObjectProperty: p] [Class: X] = {}
ontology B [ObjectProperty: p] = {}
ontology C [ObjectProperty: p] [Class: D] = B[A[p][Y[D]]]

leads to

*** Error:
file does not exist: D.env
no input found for: D

@tillmo
Copy link
Contributor

tillmo commented Jun 9, 2018

Another problem: Let A.dol contain

logic OWL
ontology A = Class: C 

and B.dol contain

from A get A
logic OWL
ontology P[A] = {}
ontology B[A] = P[A]

Then at the left-hand side of = , A correctly is interpreted as an ontology, but a the right-hand side, it is interpreted as a new class.

@tillmo
Copy link
Contributor

tillmo commented Jun 12, 2018

Another point: compound IDs with multiple components do not work. Consider

logic OWL
ontology O [Class: A] = {}
ontology P = O[C[D,E]]

I get

*** Error:
file:///home/till/temp/cc.dol:3.19:
unexpected ','

@mcodescu
Copy link
Collaborator Author

The last issue requires a modification of the parser for structured specifications.

@tillmo
Copy link
Contributor

tillmo commented Jul 12, 2018

I see. Luckily, the last issue is the least important one.

@mcodescu
Copy link
Collaborator Author

I modified a bit the test for the second issue, to make it more visible:

from A get A
logic OWL
ontology P[A] = {Class: D SubClassOf: C}
ontology B[A] = P[A]

ontology Test = B[AClass]

This goes through now.

@mcodescu
Copy link
Collaborator Author

The first two issues seem to be fixed now, please test and let me know if there are problems.

@tillmo
Copy link
Contributor

tillmo commented Jul 16, 2018

many thanks, goes through as expected!
However, there is a problem in Algebra_II:

file:///home/till/CASL/Hets-lib/Basic/Algebra_II.casl:216.35-216.41:
*** Error:
try to instantiate a formal parameter with more than one symbol with a single-symbol spec:Group

@tillmo tillmo changed the title first try to see how this would work instantiation of formal parameters with only one symbol (first try to see how this would work) Jun 29, 2019
@tillmo
Copy link
Contributor

tillmo commented Jul 27, 2023

once #1899 has been closed, this one can go

@tillmo tillmo marked this pull request as draft August 24, 2023 07:15
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 this pull request may close these issues.

2 participants