- From: Stian Soiland-Reyes <soiland-reyes@manchester.ac.uk>
- Date: Thu, 9 Nov 2017 10:31:52 +0000
- To: Victor Porton <porton@narod.ru>
- Cc: semantic-web <semantic-web@w3.org>
On Thu, 9 Nov 2017 04:50:53 +0200, Victor Porton <porton@narod.ru> wrote: > Just a few seconds ago I had a mad idea: > > Make a programming language based on RDF rather than on plain text. > > Well, this would require many (...) lists to specify the order of > execution. > > What do you think? Making a new programming language is never an easy task! You will probably want to stay closely aligned to an existing one you can map/convert to. As someone pointed out - it is all about the interface. As RDF is a graph, one would assume two models would be natural: * Functional (aka LISP trees) * Dataflow (pipelines) I don't think many programmers would want to write it natively in RDF, even in a wonderful syntax like Turtle, as it would easily become a very heavy programming language with no syntactic sugar. In the olden days people tried to do "XML-based programming" hoping to never again write a parser. I think the only one that survived of these are XSLT, which works because it is pattern based (Declarative Programming). Using RDF as the effective Abstract Syntax Tree for a programming language is on the other hand much more achievable. That would allow you to do inferences, queries, transformations, validations etc. which would be harder with a traditional straight-from-syntax AST. Procedural programming in RDF sounds more painful, due to ordering of operations and shared global variables. Object Oriented Programming have quite a few overlaps with RDFS/OWL typing, but of course the models are also quite different, which could be a challenge if you do the mapping too naively. If you want to have a go at this, then how about basing it on http://eolang.org/ which is quite a clean OO language that is also pretty much functional. As I have worked a bit with dataflows I'll extend on those below. WINGS workflows are expressed natively in RDF: http://www.wings-workflows.org/about Apache Taverna stores workflows as a series of RDF files: https://taverna.incubator.apache.org/documentation/scufl2/ontology More modern, Common Workflow Language's cwltool has --print-rdf https://gist.github.com/stain/1b73331d855cbad8882008d677d6c440 (although I am not sure if you can currently execute from that RDF) Each of these use their own vocabularies. There are more generic vocabularies, but they are not executable out of the box: https://w3id.org/ro/2016-01-28/wfdesc http://purl.org/net/p-plan http://rdf.myexperiment.org/ontologies/#Components There are also of course vocabularies for expressing RDF operations/rules in RDF, like SHACL: https://www.w3.org/TR/shacl/ and its predecessors SPIN: https://www.w3.org/Submission/spin-overview/ and VIVO Ingest workflows: https://wiki.duraspace.org/display/VIVO/Ingest+Workflow+Language -- Stian Soiland-Reyes The University of Manchester http://www.esciencelab.org.uk/ http://orcid.org/0000-0001-9842-9718
Received on Thursday, 9 November 2017 10:32:29 UTC