gruninger / Common-Logic

Documents for the developments of ISO 24707 Editiion 2 (Common Logic)
8 stars 3 forks source link

Importations between dialects #49

Open fabianneuhaus opened 9 years ago

fabianneuhaus commented 9 years ago

How are importations across dialects resolved?

fabianneuhaus commented 9 years ago

Probably we should map everything to the abstract syntax before the importations are resolved. This would require that there is a fixed mapping specified for each conformant dialect. For that to happen the abstract syntax needs to have one "concrete" lexicon. Otherwise how would you specify the mappings -- and validate them?

CL-mailing-list commented 9 years ago

Use XML as the concrete core syntax. That is exactly what it was designed for.

Pat

On Jul 20, 2015, at 8:04 AM, fabianneuhaus notifications@github.com wrote:

Probably we should map everything to the abstract syntax before the importations are resolved. This would require that there are default mappings specified for conformant dialects. For that to happen the abstract syntax needs to have "concrete" lexicons. Otherwise how would you specify the mappings -- and validate them?

� Reply to this email directly or view it on GitHub.


CL mailing list CL@philebus.tamu.edu http://philebus.tamu.edu/cgi-bin/mailman/listinfo/cl


IHMC (850)434 8903 home 40 South Alcaniz St. (850)202 4416 office Pensacola (850)202 4440 fax FL 32502 (850)291 0667 mobile (preferred) phayes@ihmc.us http://www.ihmc.us/users/phayes

whitten commented 9 years ago

Use XML as the concrete core syntax. That is exactly what it was designed for. Pat

Does this mean that if XML does NOT have a concrete syntax for some feature of Common Logic, you can't express a portable importation between two dialects ?

David

CL-mailing-list commented 9 years ago

On Aug 10, 2015, at 1:22 PM, David Whitten notifications@github.com wrote:

Use XML as the concrete core syntax. That is exactly what it was designed for. Pat

Does this mean that if XML does NOT have a concrete syntax for some feature of Common Logic, you can't express a portable importation between two dialects ?

XML is a general-purpose tool for describing syntax as markup. So, define rules/protocols for how to use XML to tag a concrete CL syntax with CL abstract syntax markers. For example, this CLIF expression

(forall (x (y foo))(if (P x)(P x y)))

might get syntax-ized as this (forgive me if I am behind the curve on abstract syntax terminology, but you will get the idea):

(forall (x(yfoo))(if (Px)(Pxy)))

which is the same string with XML markup inserted, and would become an abstract syntax version of CL simply by deleting all the (now redundant) CLIF syntax, ie everything except the names. Obviously this can be done by a parser for the concrete syntax, and indeed it should be possible to do this for ANY concrete syntax.

Variations are possible. For example, it might make sense to incorporate the concrete syntax fragments as XML properties of the XML entities rather than in-line, giving things like . But y'all have better XML wizards than me to advise you on things like that.

Pat

David

— Reply to this email directly or view it on GitHub.


CL mailing list CL@philebus.tamu.edu http://philebus.tamu.edu/cgi-bin/mailman/listinfo/cl


IHMC (850)434 8903 home 40 South Alcaniz St. (850)202 4416 office Pensacola (850)202 4440 fax FL 32502 (850)291 0667 mobile (preferred) phayes@ihmc.us http://www.ihmc.us/users/phayes