Oh, and also to clarify what Alex says: yes, I forgot -- from the 1990's onwards (and even earlier e.g. smalltalk) there was this idea that people would draw diagrams, hit a button, and the diagrams get converted into high-level code. Alex's email uses the various catch-phrases that were popular in that era.
The problem with this "model-driven" programming style is that its a one-way street: you can convert your model into code, but you can't go the other way. There's no "uncompiler" or "disassembler". One of the points of atomese, or more narrowly, of the pattern miner, or of learning, is to be able to "uncompile" or understand crazy sensory perceptions. But before you can do that, you need all sorts of infrastructure, to allow this two-way movement. None of the 1990's systems were ever designed to allow uncompiling (e.g. you cannot get the original scheme code back, after running stalin https://en.wikipedia.org/wiki/Stalin_(Scheme_implementation) you cannot get back the original cython/python code after running the cython compiler. For me, some form of "uncompiling" is cirtical -- I'd argue that "learning", "inference", "deduction", etc are all a kind-of uncompiling of raw data into abstract structures that can be manipulated by thought. consider for example, machine vision or face-recgonition algos: they are "uncompiling" an array of pixels into named objects with bounding boxes. This is the reverse of, and a lot harder than, e.g. 3d graphics that every computer game can do. --linas On Tue, May 9, 2017 at 5:25 PM, Linas Vepstas <[email protected]> wrote: > What Ben and Ivan say: . > > On Sun, May 7, 2017 at 10:03 PM, Ben Goertzel <[email protected]> wrote: > >> In principle the opencog Rule Engine and backward chainer can do this... >> > > In principle, yes. In practice, you should get to know the internals of > gcc or of clang/llvm or the java bytecode compiler, or even the > guile-scheme bytecode compiler. All of these have "intermediate languages" > (IL) inside of them. The IL are design to be > -- easy to machine-read > -- easy to machine-write > -- easy to machine-apply rewrite rules. The rewrite rules are typically > optimizations. > > That is, IL is a kind of "programming language" designed for use by > algorithms rather than by humans. > > In pretty strong sense, opencog "atomese" is meant to be a super-general, > super-whizzy IL. However, the way that it is designed would make it rather > inefficient for use as in IL inside of a compiler: gcc and llvm have nearly > a century worth of hand-crafting to make them extremely fast and well > suited for compilation. > > If you don't know IL, then I'd recommend looking ath the guile IL. I've > never had to use it, but I've skimmed it, and it looks ... interesting as > far as such things go. Note that the guile IL has both scheme, and some > version of javascript sitting on top of it. > > Anyway .. kind of the point of having atomese is in order to *avoid* the > problem you mention: using a machine to synthesize "mainstream high-level > languages" is kind of awkward, precisely because those languages are > designed for use by humans, not by machines. > > There has been some work in this area; for example, if I recall correctly, > "stalin" was a compiler that converted scheme to C code, which you could > then compile with gcc, to get high-performance compiled scheme. > > Cython does something similar: it generates C code too, although "high > performance" is not what it does. Also, the generated code is just barely > human-readable. Its not obfuscated on purpose, its just not... human. > > --linas > > > >> >> O >> > > -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/opencog. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHrUA342su7FGG9OU5VcUGux%2BtTZvK3T6RMDD%2BrM2bDwE9nimg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
