Logos formal language specification

  • 13 Replies
  • 835 Views
*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Logos formal language specification
« on: June 24, 2019, 12:10:44 PM »
I've been working on a formal language specification for a while, and it finally took a shape I'm satisfied with. If you like, you can take a look at Logos specification in the link below (some twenty minutes read). Logos stands for a (l)anguage (o)f (g)eneral (o)perational (s)emantics. The language represents all of the following:
  • Metatheory language formalization
  • Theorem prover
  • Term rewriting system
  • Data computing environment

It reminds of a Lisp (lisp is a usual choice for AI development), and brings some extension on s-expressions. Logos has completely flexible syntax, ready to host *any* theory language, from logic, to lambda calculus, to different embodiments of industry programming languages.

Its syntax is very simple, but it represents a Turing complete language:

Code: [Select]
a-expr ::= ()
         | identifier
         | a-expr a-expr
         | ‹a-expr›
         | «a-expr»
         | (a-expr)

Some of implementation is already done in a form of context free grammar parser. Further development has something to do with Turing completeness of unrestricted grammar from Chomsky hierarchy, which is an extension of context free grammar. Logos should be a form of a higher order unrestricted grammar metalanguage.

If you are into symbolic AI, Logos could be a place to start with to collect some useful info about knowledge mining. It is aimed to be a language for manipulating formal knowledge.

Read about the project here.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

Zero

  • Trusty Member
  • *********
  • Terminator
  • *
  • 799
  • Ready?
    • Thinkbots are free
Re: Logos formal language specification
« Reply #1 on: June 24, 2019, 01:31:56 PM »
Congratulations.  O0

Code: [Select]

«(a ‹⋅› b) ‹+› (a ‹⋅› c)»

(higher (a (lower ⋅) b) (lower +) (a (lower ⋅) b) )


Why did you choose to extend the S-expression syntax?

Also, another question: are parenthesis impacted by the « » and ‹ › ? or identifiers are the only things impacted? For example,
Code: [Select]
«(f ‹[› x ‹:=› «x» ‹]›) ‹->› f»
Here square brackets are part of the expression, clearly: they are "constantified"  ::)
But aren't the outer « » enough to group the left-hand side?

Sorry, I swear I'm trying real hard to get my head around it all...
Thinkbots are free, as in 'free will

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Re: Logos formal language specification
« Reply #2 on: June 24, 2019, 01:57:35 PM »
Thank you, Zero for a kind word :)

Code: [Select]

«(a ‹⋅› b) ‹+› (a ‹⋅› c)»

(higher (a (lower ⋅) b) (lower +) (a (lower ⋅) b) )


actually it is:
Code: [Select]

«(a ‹⋅› b) ‹+› (a ‹⋅› c)»

higher((a (lower ⋅) b) (lower +) (a (lower ⋅) b) )


Why did you choose to extend the S-expression syntax?

To introduce a clear distinction between variables and constants. And to relate (as an implication) constants and variables denoted by the same symbol. Note that there are no keywords. Only parenthesis and single or double angle quotes.

Also, another question: are parenthesis impacted by the « » and ‹ › ? or identifiers are the only things impacted? For example,

Parenthesis and double angle quotes can be nested, but within nests they have to be both opened and closed. It is not possible to have  `« ... ( ... » ... )`, like it is not possible to have ( ... « ... ) ». The same goes with all combinations of single and double angle quotes and round parenthesis.

 
Code: [Select]
«(f ‹[› x ‹:=› «x» ‹]›) ‹->› f»

Here square brackets are part of the expression, clearly: they are "constantified"  ::)
But aren't the outer « » enough to group the left-hand side?

The purpose of outer double angle quotes is to connect the left `f` and the right `f`. `‹->›` in between (the operator is defined earlier in the specification) allows us to automatically rewrite the left side with the right side in the context of the expression.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

Zero

  • Trusty Member
  • *********
  • Terminator
  • *
  • 799
  • Ready?
    • Thinkbots are free
Re: Logos formal language specification
« Reply #3 on: June 24, 2019, 02:47:51 PM »
Code: [Select]
higher((a (lower ⋅) b) (lower +) (a (lower ⋅) b) )
Weird, it feels like jumping from (f x) notation to f(x) notation. I don't get it.

Quote
And to relate (as an implication) constants and variables denoted by the same symbol.

z and «z» are related because the identifier is the same, am I correct?
Thinkbots are free, as in 'free will

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Re: Logos formal language specification
« Reply #4 on: June 24, 2019, 03:05:03 PM »
z and «z» are related because the identifier is the same, am I correct?

yes  ::)
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *****************
  • Sentinel
  • *
  • 3567
  • First it wiggles, then it is rewarded.
Re: Logos formal language specification
« Reply #5 on: June 24, 2019, 11:21:10 PM »
Is the idea to make many languages speak/translate to the same thing? Like hello & ko-ni-chi-wa = bonjour ?

It appears as if, like Zero's, you use a Tree that builds bigger parts,

But to truly translate languages, you need to master Context. It's not always as simple as hello=bonjour.

I see you say, in replace of context, we can use truth proving to clarify hello=bonjour. Like the frequencies of things that imply/etc. However it is the same thing, using data (context) to show what is what.

?

If we have:
"can you stick this over here"
stick doesn't mean branch, but put
Emergent

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Re: Logos formal language specification
« Reply #6 on: June 25, 2019, 08:05:09 AM »
Logos represents merely a translator from whatever to whatever. That's a definition of a term rewriting system. You can imagine translating natural language commands to sequences that output electricity of proper strength at proper wires, needed to move eyes, head, limbs, ... Moreover, if a logic is involved, we can detect contradictions (usually derivations of a form of `A /\ ~ A`) indicating what we translate is a falsehood / lie.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

goaty

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 491
Re: Logos formal language specification
« Reply #7 on: June 25, 2019, 09:47:00 AM »
logo is a cool name,  trademark it!  :D

.

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

Zero

  • Trusty Member
  • *********
  • Terminator
  • *
  • 799
  • Ready?
    • Thinkbots are free
Re: Logos formal language specification
« Reply #9 on: June 25, 2019, 09:26:59 PM »
Remaking Logo in Logos would be cool. I love Logo.
Thinkbots are free, as in 'free will

*

Zero

  • Trusty Member
  • *********
  • Terminator
  • *
  • 799
  • Ready?
    • Thinkbots are free
Re: Logos formal language specification
« Reply #10 on: June 27, 2019, 09:38:00 AM »
Thank you, Zero for a kind word :)

Code: [Select]

«(a ‹⋅› b) ‹+› (a ‹⋅› c)»

(higher (a (lower ⋅) b) (lower +) (a (lower ⋅) b) )


actually it is:
Code: [Select]

«(a ‹⋅› b) ‹+› (a ‹⋅› c)»

higher((a (lower ⋅) b) (lower +) (a (lower ⋅) b) )


Sorry Ivan, can we go over this again please, I didn't understand. I'm interesting in the potential s-expression translation one could make of an a-expression. Why is "higher" outside of parens?
Thinkbots are free, as in 'free will

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Re: Logos formal language specification
« Reply #11 on: June 27, 2019, 10:23:26 AM »
We introduced `higher` and `lower` keywords to demistify double and single angle quotes (these keywords are not included in the language by default). I assume these keywords are of the form

Code: [Select]
higher (...)
lower (...)

so the expressions inside braces don't get polluted by our new keywords. This example should represent the following (respectively):

Code: [Select]
«...»
‹...›

braces after our new keywords may be left out if expression inside them stands for a single identifier.
Dream big. The bigger the dream is, the more beautiful place the world becomes.

*

Zero

  • Trusty Member
  • *********
  • Terminator
  • *
  • 799
  • Ready?
    • Thinkbots are free
Re: Logos formal language specification
« Reply #12 on: June 27, 2019, 10:37:12 AM »
I get it, thx.

Then how would you represent a-expressions in s-expressions?
Thinkbots are free, as in 'free will

*

ivan.moony

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1288
    • e-teoria
Re: Logos formal language specification
« Reply #13 on: June 27, 2019, 11:19:20 AM »
Then how would you represent a-expressions in s-expressions?

Exactly how you proposed.

[edit]
What's more interesting is internal representation of atoms. By the definition, it is based on implication and a negation, and those two are functionally complete combination. To draw a parallel, implicational logic is based only on these two.
« Last Edit: June 27, 2019, 11:44:45 AM by ivan.moony »
Dream big. The bigger the dream is, the more beautiful place the world becomes.

 


Skywatch: Ambitious Sci-Fi Short
by Art (AI in Film and Literature.)
December 12, 2019, 04:46:32 PM
"Tinycog on a Pi" (wannabe)project
by Zero (General Project Discussion)
December 12, 2019, 02:34:58 PM
XKCD Comic : Timeline of the Universe
by Tyler (XKCD Comic)
December 12, 2019, 12:01:25 PM
hey
by Zero (General Chat)
December 12, 2019, 09:30:06 AM
Implika automated inference engine
by goaty (General Project Discussion)
December 12, 2019, 08:07:21 AM
XKCD Comic : Flu Shot
by Hopefully Something (XKCD Comic)
December 11, 2019, 10:34:15 PM
How does Google Translator work
by LOCKSUIT (General AI Discussion)
December 11, 2019, 04:18:11 PM
Slime moulds and what they learn....
by Art (General AI Discussion)
December 11, 2019, 01:37:28 PM

Users Online

25 Guests, 0 Users

Most Online Today: 41. Most Online Ever: 340 (March 26, 2019, 09:47:57 PM)

Articles