Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

The heart is not a logical organ. -- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4


devel / comp.lang.prolog / miniPROLOG --- num [ s 0 ] ........................... 5 page trace

SubjectAuthor
o miniPROLOG --- num [ s 0 ] ........................... 5 page traceGraham Cooper

1
miniPROLOG --- num [ s 0 ] ........................... 5 page trace

<bf8565e8-3cd2-4534-927a-89d4a06e99b5n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=2013&group=comp.lang.prolog#2013

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:620a:284a:b0:74d:f7d0:6a55 with SMTP id h10-20020a05620a284a00b0074df7d06a55mr274559qkp.11.1683295538476;
Fri, 05 May 2023 07:05:38 -0700 (PDT)
X-Received: by 2002:a81:e70d:0:b0:54f:93c0:4ba8 with SMTP id
x13-20020a81e70d000000b0054f93c04ba8mr993489ywl.2.1683295538146; Fri, 05 May
2023 07:05:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 5 May 2023 07:05:37 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8004:11a0:3cee:b154:547e:829e:cbdd;
posting-account=EsDGawkAAAAN6xcF2fi-X0yb3ECD-3_I
NNTP-Posting-Host: 2001:8004:11a0:3cee:b154:547e:829e:cbdd
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bf8565e8-3cd2-4534-927a-89d4a06e99b5n@googlegroups.com>
Subject: miniPROLOG --- num [ s 0 ] ........................... 5 page trace
From: grahamcooper7@gmail.com (Graham Cooper)
Injection-Date: Fri, 05 May 2023 14:05:38 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4601
 by: Graham Cooper - Fri, 5 May 2023 14:05 UTC

miniPROLOG is only 600 lines of web friendly PHP
working beautifully just have to add local variables
so it recurses down s [ s [ 0 ] ]

PROGRAM
----------------
num [ s N ]
num N

DATA
--------
num [ s N ]*
num 0

TRACE
-----------

---------------
query num [ s 0 ]
---------------
BIND1 query
FINDPRO query - query
FOUND PROGRAM query num [ s 0 ]

UNIFY2LIST 1 1 num [ s 0 ] - happy P*
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - happy P
#num#happy#

UNIFY2LIST 1 2 num [ s 0 ] - hot gaga
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - hot gaga
#num#hot#

UNIFY2LIST 1 3 num [ s 0 ] - friend gaga richard
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - friend gaga richard
#num#friend#

UNIFY2LIST 1 4 num [ s 0 ] - rich richard
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - rich richard
#num#rich#

UNIFY2LIST 1 5 num [ s 0 ] - bro pers1 bro1
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - bro pers1 bro1
#num#bro#

UNIFY2LIST 1 6 num [ s 0 ] - dot bro1 dot1
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - dot bro1 dot1
#num#dot#

UNIFY2LIST 1 7 num [ s 0 ] - frnd dot1 frnd1
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - frnd dot1 frnd1
#num#frnd#

UNIFY2LIST 1 8 num [ s 0 ] - niece P N*
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - niece P N
#num#niece#

UNIFY2LIST 1 9 num [ s 0 ] - fon PP FF*
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - fon PP FF
#num#fon#

UNIFY2LIST 1 10 num [ s 0 ] - num [ s N ]*
BIND1 num [ s 0 ]
UNIFY num [ s 0 ] - num [ s N ]
#num#num#
#[ s 0 ]#[ s N ]#
STRINGS [ s 0 ] - [ s N ]
#s 0#s N#
UNIFY s 0 - s N
#s#s#
#0#N#
>>> N = 0
FOUND num [ s 0 ]

STAR 2 num [ s 0 ] - num [ s N ]
UNIFY num [ s 0 ] - num [ s N ]
#num#num#
#[ s 0 ]#[ s N ]#
STRINGS [ s 0 ] - [ s N ]
#s 0#s N#
UNIFY s 0 - s N
#s#s#
#0#N#
BIND1 num [ s 0 ]
BIND1 num [ s N ]
STAR 3 num [ s 0 ] - num [ s N ]

---------------
query num [ s 0 ]
---------------
BIND1 query
FINDPRO num [ s N ] - query

---------------
happy P hot P friend P R rich R
---------------
BIND1 happy P
FINDPRO num [ s N ] - happy P

---------------
niece P N bro P B dot B N
---------------
BIND1 niece P N
> N = 0
FINDPRO num [ s N ] - niece P 0

---------------
fon PP FF niece PP NN frnd NN FF
---------------
BIND1 fon PP FF
FINDPRO num [ s N ] - fon PP FF

---------------
num [ s N ] num N
---------------
BIND1 num [ s N ]
FINDPRO num [ s N ] - num [ s N ]
FOUND PROGRAM num [ s N ] num N

UNIFY2LIST 2 1 num N - happy P*
BIND1 num N
> N = 0
UNIFY num 0 - happy P
#num#happy#

UNIFY2LIST 2 2 num 0 - hot gaga
BIND1 num 0
UNIFY num 0 - hot gaga
#num#hot#

UNIFY2LIST 2 3 num 0 - friend gaga richard
BIND1 num 0
UNIFY num 0 - friend gaga richard
#num#friend#

UNIFY2LIST 2 4 num 0 - rich richard
BIND1 num 0
UNIFY num 0 - rich richard
#num#rich#

UNIFY2LIST 2 5 num 0 - bro pers1 bro1
BIND1 num 0
UNIFY num 0 - bro pers1 bro1
#num#bro#

UNIFY2LIST 2 6 num 0 - dot bro1 dot1
BIND1 num 0
UNIFY num 0 - dot bro1 dot1
#num#dot#

UNIFY2LIST 2 7 num 0 - frnd dot1 frnd1
BIND1 num 0
UNIFY num 0 - frnd dot1 frnd1
#num#frnd#

UNIFY2LIST 2 8 num 0 - niece P N*
BIND1 num 0
UNIFY num 0 - niece P N
#num#niece#

UNIFY2LIST 2 9 num 0 - fon PP FF*
BIND1 num 0
UNIFY num 0 - fon PP FF
#num#fon#

UNIFY2LIST 2 10 num 0 - num [ s N ]*
BIND1 num 0
UNIFY num 0 - num [ s N ]
#num#num#
#0#[ s N ]#

UNIFY2LIST 2 11 num 0 - num 0
BIND1 num 0
UNIFY num 0 - num 0
#num#num#
#0#0#
FOUND num 0

RUN REST
FINITO
RUN REST

YES

www.miniPROLOG.com

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor