spechub / Hets

The Heterogeneous Tool Set
http://hets.eu
GNU General Public License v2.0
57 stars 19 forks source link

Stratify names of instantiations of compound ids in OWL2 #1754

Open tillmo opened 7 years ago

tillmo commented 7 years ago

If in an instantiation a component of a compound ID does not occur in a formal parameter, it should be stratified, using _. Note that components are only stratified if all earlier occurring components are stratified as well. E.g. id[a,b,c] is stratified to id_a_b[c] if only c occurs in a formal parameter.

Stratification should also be allowed as input syntax, in order to avoid too complex nestings of square brackets in parameterised OMS (which also use square brackets for parameter OMS).

BerndKB commented 7 years ago

@tillmo: It would be sufficient to keep the compound names as in CASL while working in GDOL/Hets and to do the stratification only when NO MORE formal parameters are visible in the context for the compound name; in other words when moving from the GDOL/Hets world to the OWL2 world. One could call this an outermost instantiation or final instantiation. Then the need for partial instantiations goes away.

tillmo commented 7 years ago

I have discussed this with @fabianneuhaus. The new idea is to use other brackets that are legal in IRIs, see #1596. Then the present issue would become vacuous.

tillmo commented 7 years ago

@BerndKB: the definition of "final instantiation" is not so clear. Consider https://ontohub.org/hets-lib/Basic/Algebra_I.casl. ConstructFactorialRing is a non-generic specification, and it imports Bag [sort Elem]. Hence the latter would be a "final instantiation". Similar for FactorialRing which just hides some symbols from ConstructFactorialRing. However, later on, there is ExtFactorialRing [FactorialRing]. Hence, the "final instantiation" suddenly appears in the context of a generic specification.

BerndKB commented 7 years ago

Hallo Till,

ich finde die angegebenen Specs nicht unter dem Link …

Gruß Bernd

Am 21.09.2017 um 11:27 Uhr schrieb Till Mossakowski notifications@github.com:

@BerndKB: the definition of "final instantiation" is not so clear. Consider https://ontohub.org/hets-lib/Basic/Algebra_I.casl. ConstructFactorialRing is a non-generic specification, and it imports Bag [sort Elem]. Hence the latter would be a "final instantiation". Similar for FactorialRing which just hides some symbols from ConstructFactorialRing. However, later on, there is ExtFactorialRing [FactorialRing]. Hence, the "final instantiation" suddenly appears in the context of a generic specification.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

tillmo commented 7 years ago

oh sorry, I meant https://ontohub.org/hets-lib/Basic/Algebra_II.casl (on github, we should use English...)

tillmo commented 7 years ago

new idea: provide a flattening to native document command, see #1755, with an option that "[" and "," and "]" are replaced by "_" and "_" and "", resp.