Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The clothes have no emperor. -- C. A. R. Hoare, commenting on ADA.


devel / comp.lang.prolog / Re: Creating A PATH in miniPROLOG

SubjectAuthor
* Creating A PATH in miniPROLOGGraham Cooper
`- Creating A PATH in miniPROLOGGraham Cooper

1
Creating A PATH in miniPROLOG

<20eb8a3b-cb6f-4c71-82a4-5ba89d94279bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9987&group=comp.lang.prolog#9987

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:6214:a04:b0:5ef:4ecb:b47e with SMTP id dw4-20020a0562140a0400b005ef4ecbb47emr6901218qvb.8.1684325956768;
Wed, 17 May 2023 05:19:16 -0700 (PDT)
X-Received: by 2002:a81:b509:0:b0:54f:b56a:cd0f with SMTP id
t9-20020a81b509000000b0054fb56acd0fmr24587311ywh.3.1684325956400; Wed, 17 May
2023 05:19:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.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: Wed, 17 May 2023 05:19:16 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8004:11a0:db4:946b:e2b3:1a53:4737;
posting-account=EsDGawkAAAAN6xcF2fi-X0yb3ECD-3_I
NNTP-Posting-Host: 2001:8004:11a0:db4:946b:e2b3:1a53:4737
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <20eb8a3b-cb6f-4c71-82a4-5ba89d94279bn@googlegroups.com>
Subject: Creating A PATH in miniPROLOG
From: grahamco...@gmail.com (Graham Cooper)
Injection-Date: Wed, 17 May 2023 12:19:16 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 18904
 by: Graham Cooper - Wed, 17 May 2023 12:19 UTC

www.miniPROLOG.com

Here is the map, try to go from 1 to 11

rd 1 2
rd 2 3
rd 3 4
rd 4 5
rd 5 6
rd 3 10
rd 10 11

ANSWER AT END

query :- go 1 11 PATH
-----------
---------- BEGIN 2 ---------
GOAL go 1 11 PATH
2> F = 1
2> T = 11
2> PATH = P
TARGET go F T P

****** 2 ******
F = 1 T = 11 PATH = P
****************
BIND8 go 1 11 PATH 2
SET PATH = P

RULE 1
2> FROM = 1
2> TO = 11
2> P == 1
PATH == P ==> 1
MATCH1 go FROM TO FROM ---- go F T P
2>> F = 1
2>> T = 11
2>> P = 1
RESET PATH = P
MATCH2 go FROM TO FROM ---- go 1 11 1

****** 2 ******
F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = 1
****************
-----------
go FROM TO FROM :- rd FROM TO
-----------
---------- BEGIN 3 ---------
2>> FROM = 1
2>> TO = 11
GOAL rd 1 11
NOT FOUND

****** 2 ******
F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = 1
****************

RULE 2

****** 2 ******
F = 1 T = 11 PATH = P
****************
BIND8 go 1 11 PATH 2
RESETTING PATH = P
SET PATH = P
SET PATH = P
2> FROM = 1
2> TO = 11
2> P == 1
PATH == P ==> 1
2> FROM = 1
2> TO = 11
2> P = [ p FROM PTH ]
PATH == P ==> [ p FROM PTH ]
MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
2>> F = 1
2>> T = 11
FROM-->1
PTH-->PTH
2>> P = [ p 1 PTH ]
RESET PATH = P
MATCH2 go FROM TO [ p FROM PTH ] ---- go 1 11 [ p 1 PTH ]

****** 2 ******
F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = [ p 1 PTH ]
****************
-----------
go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
-----------
---------- BEGIN 4 ---------
2>> FROM = 1
GOAL rd 1 MID
4> MID = 2
PATH == P ==> [ p 1 PTH ]
TARGET rd 1 2

****** 4 ******
F = 1 T = 11 PATH = [ p 1 PTH ] FROM = 1 TO = 11 P = [ p 1 PTH ] MID = 2
****************
---------- BEGIN 5 ---------
4>> MID = 2
4>> TO = 11
GOAL go 2 11 PTH
5> F = 2
5> T = 11
5> PTH = P
TARGET go F T P

****** 5 ******
F = 2 T = 11 PTH = P
****************
BIND8 go 2 11 PTH 5
RESETTING PATH = P
SET PTH = P
5>>> PARAMETER P = [ p 1 PTH ]
SET PATH = P
5>>> PARAMETER P = [ p 1 PTH ]

RULE 1
5> FROM = 2
5> TO = 11
5> P == 2
PTH == P ==> 2
PATH == P ==> 2
MATCH1 go FROM TO FROM ---- go F T P
FETCH P = [ p 1 PTH ]
5>> F = 2
5>> T = 11
PTH-->2
5>> P = [ p 1 2 ]
RESET PATH = P
RESET PTH = P
MATCH2 go FROM TO FROM ---- go 2 11 [ p 1 2 ]

****** 5 ******
F = 2 T = 11 PTH = P PATH = P P = [ p 1 2 ] FROM = 2 TO = 11
****************
-----------
go FROM TO FROM :- rd FROM TO
-----------
---------- BEGIN 6 ---------
5>> FROM = 2
5>> TO = 11
GOAL rd 2 11
NOT FOUND

****** 5 ******
F = 2 T = 11 PTH = P PATH = P P = [ p 1 2 ] FROM = 2 TO = 11
****************

RULE 2

****** 5 ******
F = 2 T = 11 PTH = P PATH = P P =
****************
BIND8 go 2 11 PTH 5
RESETTING PATH = P
RESETTING PTH = P
SET PTH = P
5>>> PARAMETER P = [ p 1 PTH ]
SET PATH = P
5>>> PARAMETER P = [ p 1 PTH ]
SET PTH = P
5>>> PARAMETER P = [ p 1 PTH ]
5> FROM = 2
5> TO = 11
5> P == 2
PTH == P ==> 2
PATH == P ==> 2
5> FROM = 2
5> TO = 11
5> P = [ p FROM PTH ]
PTH == P ==> [ p FROM PTH ]
PATH == P ==> [ p FROM PTH ]
MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
FETCH P = [ p 1 PTH ]
5>> F = 2
5>> T = 11
FROM-->2
PTH-->[ p 2 PTH ]
5>> P = [ p 1 [ p 2 PTH ] ]
RESET PATH = P
RESET PTH = P
MATCH2 go FROM TO [ p FROM PTH ] ---- go 2 11 [ p 1 [ p 2 PTH ] ]

****** 5 ******
F = 2 T = 11 PTH = P PATH = P P = [ p 1 [ p 2 PTH ] ] FROM = 2 TO = 11
****************
-----------
go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
-----------
---------- BEGIN 7 ---------
5>> FROM = 2
GOAL rd 2 MID
7> MID = 3
PTH == P ==> [ p 1 [ p 2 PTH ] ]
PATH == P ==> [ p 1 [ p 2 PTH ] ]
TARGET rd 2 3

****** 7 ******
F = 2 T = 11 PTH = [ p 1 [ p 2 PTH ] ] PATH = [ p 1 [ p 2 PTH ] ] P = [ p 1 [ p 2 PTH ] ] FROM = 2 TO = 11 MID = 3
****************
---------- BEGIN 8 ---------
7>> MID = 3
7>> TO = 11
7>> PTH = [ p 1 [ p 2 PTH ] ]
GOAL go 3 11 [ p 1 [ p 2 PTH ] ]
8> F = 3
8> T = 11
8> P = [ p 1 [ p 2 PTH ] ]
TARGET go F T P

****** 8 ******
F = 3 T = 11 P = [ p 1 [ p 2 PTH ] ]
****************
BIND8 go 3 11 [ p 1 [ p 2 PTH ] ] 8
RESETTING PATH = P
RESETTING PTH = P
SET PATH = P
8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
SET PTH = P
8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]

RULE 1
8> FROM = 3
8> TO = 11
8> P == 3
PATH == P ==> 3
PTH == P ==> 3
MATCH1 go FROM TO FROM ---- go F T P
FETCH P = [ p 1 [ p 2 PTH ] ]
8>> F = 3
8>> T = 11
PTH-->3
8>> P = [ p 1 [ p 2 3 ] ]
RESET PATH = P
RESET PTH = P
MATCH2 go FROM TO FROM ---- go 3 11 [ p 1 [ p 2 3 ] ]

****** 8 ******
F = 3 T = 11 P = [ p 1 [ p 2 3 ] ] PATH = P PTH = P FROM = 3 TO = 11
****************
-----------
go FROM TO FROM :- rd FROM TO
-----------
---------- BEGIN 9 ---------
8>> FROM = 3
8>> TO = 11
GOAL rd 3 11
NOT FOUND

****** 8 ******
F = 3 T = 11 P = [ p 1 [ p 2 3 ] ] PATH = P PTH = P FROM = 3 TO = 11
****************

RULE 2

****** 8 ******
F = 3 T = 11 P = PATH = P PTH = P
****************
BIND8 go 3 11 [ p 1 [ p 2 PTH ] ] 8
RESETTING PATH = P
RESETTING PTH = P
SET PATH = P
8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
SET PTH = P
8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
8> FROM = 3
8> TO = 11
8> P == 3
PATH == P ==> 3
PTH == P ==> 3
8> FROM = 3
8> TO = 11
8> P = [ p FROM PTH ]
PATH == P ==> [ p FROM PTH ]
PTH == P ==> [ p FROM PTH ]
MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
FETCH P = [ p 1 [ p 2 PTH ] ]
8>> F = 3
8>> T = 11
FROM-->3
PTH-->[ p 3 PTH ]
8>> P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
RESET PATH = P
RESET PTH = P
MATCH2 go FROM TO [ p FROM PTH ] ---- go 3 11 [ p 1 [ p 2 [ p 3 PTH ] ] ]

****** 8 ******
F = 3 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ] PATH = P PTH = P FROM = 3 TO = 11
****************
-----------
go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
-----------
---------- BEGIN 10 ---------
8>> FROM = 3
GOAL rd 3 MID
10> MID = 4
PATH == P ==> [ p 1 [ p 2 [ p 3 PTH ] ] ]
PTH == P ==> [ p 1 [ p 2 [ p 3 PTH ] ] ]
TARGET rd 3 4

****** 10 ******
F = 3 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ] PATH = [ p 1 [ p 2 [ p 3 PTH ] ] ] PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ] FROM = 3 TO = 11 MID = 4
****************
---------- BEGIN 11 ---------
10>> MID = 4
10>> TO = 11
10>> PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ]
GOAL go 4 11 [ p 1 [ p 2 [ p 3 PTH ] ] ]
11> F = 4
11> T = 11
11> P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
TARGET go F T P

****** 11 ******
F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
****************
BIND8 go 4 11 [ p 1 [ p 2 [ p 3 PTH ] ] ] 11
RESETTING PATH = P
RESETTING PTH = P
SET PATH = P
11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
SET PTH = P
11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]

RULE 1
11> FROM = 4
11> TO = 11
11> P == 4
PATH == P ==> 4
PTH == P ==> 4
MATCH1 go FROM TO FROM ---- go F T P
FETCH P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
11>> F = 4
11>> T = 11
PTH-->4
11>> P = [ p 1 [ p 2 [ p 3 4 ] ] ]
RESET PATH = P
RESET PTH = P
MATCH2 go FROM TO FROM ---- go 4 11 [ p 1 [ p 2 [ p 3 4 ] ] ]

****** 11 ******
F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 4 ] ] ] PATH = P PTH = P FROM = 4 TO = 11
****************
-----------
go FROM TO FROM :- rd FROM TO
-----------
---------- BEGIN 12 ---------
11>> FROM = 4
11>> TO = 11
GOAL rd 4 11
NOT FOUND

****** 11 ******
F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 4 ] ] ] PATH = P PTH = P FROM = 4 TO = 11
****************

RULE 2

****** 11 ******
F = 4 T = 11 P = PATH = P PTH = P
****************
BIND8 go 4 11 [ p 1 [ p 2 [ p 3 PTH ] ] ] 11
RESETTING PATH = P
RESETTING PTH = P
SET PATH = P
11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
SET PTH = P
11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
11> FROM = 4
11> TO = 11
11> P == 4
PATH == P ==> 4
PTH == P ==> 4
11> FROM = 4
11> TO = 11
11> P = [ p FROM PTH ]
PATH == P ==> [ p FROM PTH ]
PTH == P ==> [ p FROM PTH ]
MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
FETCH P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
11>> F = 4
11>> T = 11
FROM-->4
PTH-->[ p 4 PTH ]
11>> P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
RESET PATH = P
RESET PTH = P
MATCH2 go FROM TO [ p FROM PTH ] ---- go 4 11 [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]


Click here to read the complete article
Re: Creating A PATH in miniPROLOG

<d3aef80b-bb1c-4506-9cdb-fea1341259cfn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10083&group=comp.lang.prolog#10083

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:ac8:6c3:0:b0:411:fc62:8592 with SMTP id j3-20020ac806c3000000b00411fc628592mr196890qth.4.1694236870119;
Fri, 08 Sep 2023 22:21:10 -0700 (PDT)
X-Received: by 2002:a63:724e:0:b0:573:ff6d:d463 with SMTP id
c14-20020a63724e000000b00573ff6dd463mr820536pgn.8.1694236869550; Fri, 08 Sep
2023 22:21:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Fri, 8 Sep 2023 22:21:09 -0700 (PDT)
In-Reply-To: <20eb8a3b-cb6f-4c71-82a4-5ba89d94279bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8004:1140:30c3:4960:212a:67cd:4f18;
posting-account=UEKa7QoAAACYDHVKd9at5TkAJKf4uwyI
NNTP-Posting-Host: 2001:8004:1140:30c3:4960:212a:67cd:4f18
References: <20eb8a3b-cb6f-4c71-82a4-5ba89d94279bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d3aef80b-bb1c-4506-9cdb-fea1341259cfn@googlegroups.com>
Subject: Re: Creating A PATH in miniPROLOG
From: gr4h4m.c...@gmail.com (Graham Cooper)
Injection-Date: Sat, 09 Sep 2023 05:21:10 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Graham Cooper - Sat, 9 Sep 2023 05:21 UTC

On Wednesday, May 17, 2023 at 10:19:17 PM UTC+10, Graham Cooper wrote:
> www.miniPROLOG.com
>
> Here is the map, try to go from 1 to 11
>
> rd 1 2
> rd 2 3
> rd 3 4
> rd 4 5
> rd 5 6
> rd 3 10
> rd 10 11
>
> ANSWER AT END
>
>
>
>
> query :- go 1 11 PATH
> -----------
> ---------- BEGIN 2 ---------
> GOAL go 1 11 PATH
> 2> F = 1
> 2> T = 11
> 2> PATH = P
> TARGET go F T P
>
> ****** 2 ******
> F = 1 T = 11 PATH = P
> ****************
> BIND8 go 1 11 PATH 2
> SET PATH = P
>
> RULE 1
> 2> FROM = 1
> 2> TO = 11
> 2> P == 1
> PATH == P ==> 1
> MATCH1 go FROM TO FROM ---- go F T P
> 2>> F = 1
> 2>> T = 11
> 2>> P = 1
> RESET PATH = P
> MATCH2 go FROM TO FROM ---- go 1 11 1
>
> ****** 2 ******
> F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = 1
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 3 ---------
> 2>> FROM = 1
> 2>> TO = 11
> GOAL rd 1 11
> NOT FOUND
>
> ****** 2 ******
> F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = 1
> ****************
>
> RULE 2
>
> ****** 2 ******
> F = 1 T = 11 PATH = P
> ****************
> BIND8 go 1 11 PATH 2
> RESETTING PATH = P
> SET PATH = P
> SET PATH = P
> 2> FROM = 1
> 2> TO = 11
> 2> P == 1
> PATH == P ==> 1
> 2> FROM = 1
> 2> TO = 11
> 2> P = [ p FROM PTH ]
> PATH == P ==> [ p FROM PTH ]
> MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
> 2>> F = 1
> 2>> T = 11
> FROM-->1
> PTH-->PTH
> 2>> P = [ p 1 PTH ]
> RESET PATH = P
> MATCH2 go FROM TO [ p FROM PTH ] ---- go 1 11 [ p 1 PTH ]
>
> ****** 2 ******
> F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = [ p 1 PTH ]
> ****************
> -----------
> go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
> -----------
> ---------- BEGIN 4 ---------
> 2>> FROM = 1
> GOAL rd 1 MID
> 4> MID = 2
> PATH == P ==> [ p 1 PTH ]
> TARGET rd 1 2
>
> ****** 4 ******
> F = 1 T = 11 PATH = [ p 1 PTH ] FROM = 1 TO = 11 P = [ p 1 PTH ] MID = 2
> ****************
> ---------- BEGIN 5 ---------
> 4>> MID = 2
> 4>> TO = 11
> GOAL go 2 11 PTH
> 5> F = 2
> 5> T = 11
> 5> PTH = P
> TARGET go F T P
>
> ****** 5 ******
> F = 2 T = 11 PTH = P
> ****************
> BIND8 go 2 11 PTH 5
> RESETTING PATH = P
> SET PTH = P
> 5>>> PARAMETER P = [ p 1 PTH ]
> SET PATH = P
> 5>>> PARAMETER P = [ p 1 PTH ]
>
> RULE 1
> 5> FROM = 2
> 5> TO = 11
> 5> P == 2
> PTH == P ==> 2
> PATH == P ==> 2
> MATCH1 go FROM TO FROM ---- go F T P
> FETCH P = [ p 1 PTH ]
> 5>> F = 2
> 5>> T = 11
> PTH-->2
> 5>> P = [ p 1 2 ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO FROM ---- go 2 11 [ p 1 2 ]
>
> ****** 5 ******
> F = 2 T = 11 PTH = P PATH = P P = [ p 1 2 ] FROM = 2 TO = 11
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 6 ---------
> 5>> FROM = 2
> 5>> TO = 11
> GOAL rd 2 11
> NOT FOUND
>
> ****** 5 ******
> F = 2 T = 11 PTH = P PATH = P P = [ p 1 2 ] FROM = 2 TO = 11
> ****************
>
> RULE 2
>
> ****** 5 ******
> F = 2 T = 11 PTH = P PATH = P P =
> ****************
> BIND8 go 2 11 PTH 5
> RESETTING PATH = P
> RESETTING PTH = P
> SET PTH = P
> 5>>> PARAMETER P = [ p 1 PTH ]
> SET PATH = P
> 5>>> PARAMETER P = [ p 1 PTH ]
> SET PTH = P
> 5>>> PARAMETER P = [ p 1 PTH ]
> 5> FROM = 2
> 5> TO = 11
> 5> P == 2
> PTH == P ==> 2
> PATH == P ==> 2
> 5> FROM = 2
> 5> TO = 11
> 5> P = [ p FROM PTH ]
> PTH == P ==> [ p FROM PTH ]
> PATH == P ==> [ p FROM PTH ]
> MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
> FETCH P = [ p 1 PTH ]
> 5>> F = 2
> 5>> T = 11
> FROM-->2
> PTH-->[ p 2 PTH ]
> 5>> P = [ p 1 [ p 2 PTH ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO [ p FROM PTH ] ---- go 2 11 [ p 1 [ p 2 PTH ] ]
>
> ****** 5 ******
> F = 2 T = 11 PTH = P PATH = P P = [ p 1 [ p 2 PTH ] ] FROM = 2 TO = 11
> ****************
> -----------
> go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
> -----------
> ---------- BEGIN 7 ---------
> 5>> FROM = 2
> GOAL rd 2 MID
> 7> MID = 3
> PTH == P ==> [ p 1 [ p 2 PTH ] ]
> PATH == P ==> [ p 1 [ p 2 PTH ] ]
> TARGET rd 2 3
>
> ****** 7 ******
> F = 2 T = 11 PTH = [ p 1 [ p 2 PTH ] ] PATH = [ p 1 [ p 2 PTH ] ] P = [ p 1 [ p 2 PTH ] ] FROM = 2 TO = 11 MID = 3
> ****************
> ---------- BEGIN 8 ---------
> 7>> MID = 3
> 7>> TO = 11
> 7>> PTH = [ p 1 [ p 2 PTH ] ]
> GOAL go 3 11 [ p 1 [ p 2 PTH ] ]
> 8> F = 3
> 8> T = 11
> 8> P = [ p 1 [ p 2 PTH ] ]
> TARGET go F T P
>
> ****** 8 ******
> F = 3 T = 11 P = [ p 1 [ p 2 PTH ] ]
> ****************
> BIND8 go 3 11 [ p 1 [ p 2 PTH ] ] 8
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
> SET PTH = P
> 8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
>
> RULE 1
> 8> FROM = 3
> 8> TO = 11
> 8> P == 3
> PATH == P ==> 3
> PTH == P ==> 3
> MATCH1 go FROM TO FROM ---- go F T P
> FETCH P = [ p 1 [ p 2 PTH ] ]
> 8>> F = 3
> 8>> T = 11
> PTH-->3
> 8>> P = [ p 1 [ p 2 3 ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO FROM ---- go 3 11 [ p 1 [ p 2 3 ] ]
>
> ****** 8 ******
> F = 3 T = 11 P = [ p 1 [ p 2 3 ] ] PATH = P PTH = P FROM = 3 TO = 11
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 9 ---------
> 8>> FROM = 3
> 8>> TO = 11
> GOAL rd 3 11
> NOT FOUND
>
> ****** 8 ******
> F = 3 T = 11 P = [ p 1 [ p 2 3 ] ] PATH = P PTH = P FROM = 3 TO = 11
> ****************
>
> RULE 2
>
> ****** 8 ******
> F = 3 T = 11 P = PATH = P PTH = P
> ****************
> BIND8 go 3 11 [ p 1 [ p 2 PTH ] ] 8
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
> SET PTH = P
> 8>>> PARAMETER P = [ p 1 [ p 2 PTH ] ]
> 8> FROM = 3
> 8> TO = 11
> 8> P == 3
> PATH == P ==> 3
> PTH == P ==> 3
> 8> FROM = 3
> 8> TO = 11
> 8> P = [ p FROM PTH ]
> PATH == P ==> [ p FROM PTH ]
> PTH == P ==> [ p FROM PTH ]
> MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
> FETCH P = [ p 1 [ p 2 PTH ] ]
> 8>> F = 3
> 8>> T = 11
> FROM-->3
> PTH-->[ p 3 PTH ]
> 8>> P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO [ p FROM PTH ] ---- go 3 11 [ p 1 [ p 2 [ p 3 PTH ] ] ]
>
> ****** 8 ******
> F = 3 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ] PATH = P PTH = P FROM = 3 TO = 11
> ****************
> -----------
> go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
> -----------
> ---------- BEGIN 10 ---------
> 8>> FROM = 3
> GOAL rd 3 MID
> 10> MID = 4
> PATH == P ==> [ p 1 [ p 2 [ p 3 PTH ] ] ]
> PTH == P ==> [ p 1 [ p 2 [ p 3 PTH ] ] ]
> TARGET rd 3 4
>
> ****** 10 ******
> F = 3 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ] PATH = [ p 1 [ p 2 [ p 3 PTH ] ] ] PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ] FROM = 3 TO = 11 MID = 4
> ****************
> ---------- BEGIN 11 ---------
> 10>> MID = 4
> 10>> TO = 11
> 10>> PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> GOAL go 4 11 [ p 1 [ p 2 [ p 3 PTH ] ] ]
> 11> F = 4
> 11> T = 11
> 11> P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> TARGET go F T P
>
> ****** 11 ******
> F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> ****************
> BIND8 go 4 11 [ p 1 [ p 2 [ p 3 PTH ] ] ] 11
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> SET PTH = P
> 11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
>
> RULE 1
> 11> FROM = 4
> 11> TO = 11
> 11> P == 4
> PATH == P ==> 4
> PTH == P ==> 4
> MATCH1 go FROM TO FROM ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> 11>> F = 4
> 11>> T = 11
> PTH-->4
> 11>> P = [ p 1 [ p 2 [ p 3 4 ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO FROM ---- go 4 11 [ p 1 [ p 2 [ p 3 4 ] ] ]
>
> ****** 11 ******
> F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 4 ] ] ] PATH = P PTH = P FROM = 4 TO = 11
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 12 ---------
> 11>> FROM = 4
> 11>> TO = 11
> GOAL rd 4 11
> NOT FOUND
>
> ****** 11 ******
> F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 4 ] ] ] PATH = P PTH = P FROM = 4 TO = 11
> ****************
>
> RULE 2
>
> ****** 11 ******
> F = 4 T = 11 P = PATH = P PTH = P
> ****************
> BIND8 go 4 11 [ p 1 [ p 2 [ p 3 PTH ] ] ] 11
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> SET PTH = P
> 11>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> 11> FROM = 4
> 11> TO = 11
> 11> P == 4
> PATH == P ==> 4
> PTH == P ==> 4
> 11> FROM = 4
> 11> TO = 11
> 11> P = [ p FROM PTH ]
> PATH == P ==> [ p FROM PTH ]
> PTH == P ==> [ p FROM PTH ]
> MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> 11>> F = 4
> 11>> T = 11
> FROM-->4
> PTH-->[ p 4 PTH ]
> 11>> P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO [ p FROM PTH ] ---- go 4 11 [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
>
> ****** 11 ******
> F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] PATH = P PTH = P FROM = 4 TO = 11
> ****************
> -----------
> go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
> -----------
> ---------- BEGIN 13 ---------
> 11>> FROM = 4
> GOAL rd 4 MID
> 13> MID = 5
> PATH == P ==> [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> PTH == P ==> [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> TARGET rd 4 5
>
> ****** 13 ******
> F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] PATH = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] PTH = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] FROM = 4 TO = 11 MID = 5
> ****************
> ---------- BEGIN 14 ---------
> 13>> MID = 5
> 13>> TO = 11
> 13>> PTH = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> GOAL go 5 11 [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> 14> F = 5
> 14> T = 11
> 14> P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> TARGET go F T P
>
> ****** 14 ******
> F = 5 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> ****************
> BIND8 go 5 11 [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] 14
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 14>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> SET PTH = P
> 14>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
>
> RULE 1
> 14> FROM = 5
> 14> TO = 11
> 14> P == 5
> PATH == P ==> 5
> PTH == P ==> 5
> MATCH1 go FROM TO FROM ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> 14>> F = 5
> 14>> T = 11
> PTH-->5
> 14>> P = [ p 1 [ p 2 [ p 3 [ p 4 5 ] ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO FROM ---- go 5 11 [ p 1 [ p 2 [ p 3 [ p 4 5 ] ] ] ]
>
> ****** 14 ******
> F = 5 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 5 ] ] ] ] PATH = P PTH = P FROM = 5 TO = 11
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 15 ---------
> 14>> FROM = 5
> 14>> TO = 11
> GOAL rd 5 11
> NOT FOUND
>
> ****** 14 ******
> F = 5 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 5 ] ] ] ] PATH = P PTH = P FROM = 5 TO = 11
> ****************
>
> RULE 2
>
> ****** 14 ******
> F = 5 T = 11 P = PATH = P PTH = P
> ****************
> BIND8 go 5 11 [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] 14
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 14>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> SET PTH = P
> 14>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> 14> FROM = 5
> 14> TO = 11
> 14> P == 5
> PATH == P ==> 5
> PTH == P ==> 5
> 14> FROM = 5
> 14> TO = 11
> 14> P = [ p FROM PTH ]
> PATH == P ==> [ p FROM PTH ]
> PTH == P ==> [ p FROM PTH ]
> MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> 14>> F = 5
> 14>> T = 11
> FROM-->5
> PTH-->[ p 5 PTH ]
> 14>> P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO [ p FROM PTH ] ---- go 5 11 [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
>
> ****** 14 ******
> F = 5 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] PATH = P PTH = P FROM = 5 TO = 11
> ****************
> -----------
> go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
> -----------
> ---------- BEGIN 16 ---------
> 14>> FROM = 5
> GOAL rd 5 MID
> 16> MID = 6
> PATH == P ==> [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> PTH == P ==> [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> TARGET rd 5 6
>
> ****** 16 ******
> F = 5 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] PATH = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] PTH = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] FROM = 5 TO = 11 MID = 6
> ****************
> ---------- BEGIN 17 ---------
> 16>> MID = 6
> 16>> TO = 11
> 16>> PTH = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> GOAL go 6 11 [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> 17> F = 6
> 17> T = 11
> 17> P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> TARGET go F T P
>
> ****** 17 ******
> F = 6 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> ****************
> BIND8 go 6 11 [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] 17
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 17>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> SET PTH = P
> 17>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
>
> RULE 1
> 17> FROM = 6
> 17> TO = 11
> 17> P == 6
> PATH == P ==> 6
> PTH == P ==> 6
> MATCH1 go FROM TO FROM ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> 17>> F = 6
> 17>> T = 11
> PTH-->6
> 17>> P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 6 ] ] ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO FROM ---- go 6 11 [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 6 ] ] ] ] ]
>
> ****** 17 ******
> F = 6 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 6 ] ] ] ] ] PATH = P PTH = P FROM = 6 TO = 11
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 18 ---------
> 17>> FROM = 6
> 17>> TO = 11
> GOAL rd 6 11
> NOT FOUND
>
> ****** 17 ******
> F = 6 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 6 ] ] ] ] ] PATH = P PTH = P FROM = 6 TO = 11
> ****************
>
> RULE 2
>
> ****** 17 ******
> F = 6 T = 11 P = PATH = P PTH = P
> ****************
> BIND8 go 6 11 [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] 17
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 17>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> SET PTH = P
> 17>>> PARAMETER P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> 17> FROM = 6
> 17> TO = 11
> 17> P == 6
> PATH == P ==> 6
> PTH == P ==> 6
> 17> FROM = 6
> 17> TO = 11
> 17> P = [ p FROM PTH ]
> PATH == P ==> [ p FROM PTH ]
> PTH == P ==> [ p FROM PTH ]
> MATCH1 go FROM TO [ p FROM PTH ] ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> 17>> F = 6
> 17>> T = 11
> FROM-->6
> PTH-->[ p 6 PTH ]
> 17>> P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 [ p 6 PTH ] ] ] ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO [ p FROM PTH ] ---- go 6 11 [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 [ p 6 PTH ] ] ] ] ] ]
>
> ****** 17 ******
> F = 6 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 [ p 6 PTH ] ] ] ] ] ] PATH = P PTH = P FROM = 6 TO = 11
> ****************
> -----------
> go FROM TO [ p FROM PTH ] :- rd FROM MID go MID TO PTH
> -----------
> ---------- BEGIN 19 ---------
> 17>> FROM = 6
> GOAL rd 6 MID
> NOT FOUND
>
> ****** 17 ******
> F = 6 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 [ p 6 PTH ] ] ] ] ] ] PATH = P PTH = P FROM = 6 TO = 11
> ****************
> NOT FOUND
> BACKTRACK
>
> BACKTRACK ENV: 14 PREVPOP: 16
> backtrack params P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ]
> backtrack reset PATH = P
> backtrack reset PTH = P
> NOT FOUND
>
> ****** 14 ******
> F = 5 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 [ p 5 PTH ] ] ] ] ] PATH = P PTH = P FROM = 5 TO = 11
> ****************
> NOT FOUND
> BACKTRACK
>
> BACKTRACK ENV: 11 PREVPOP: 13
> backtrack params P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ]
> backtrack reset PATH = P
> backtrack reset PTH = P
> NOT FOUND
>
> ****** 11 ******
> F = 4 T = 11 P = [ p 1 [ p 2 [ p 3 [ p 4 PTH ] ] ] ] PATH = P PTH = P FROM = 4 TO = 11
> ****************
> NOT FOUND
> BACKTRACK
>
> BACKTRACK ENV: 8 PREVPOP: 10
> backtrack params P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> backtrack reset PATH = P
> backtrack reset PTH = P
> 8> MID = 10
> PATH == P ==> [ p 1 [ p 2 [ p 3 PTH ] ] ]
> PTH == P ==> [ p 1 [ p 2 [ p 3 PTH ] ] ]
> TARGET rd 3 10
>
> ****** 8 ******
> F = 3 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ] PATH = [ p 1 [ p 2 [ p 3 PTH ] ] ] PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ] FROM = 3 TO = 11 MID = 10
> ****************
> ---------- BEGIN 20 ---------
> 8>> MID = 10
> 8>> TO = 11
> 8>> PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> GOAL go 10 11 [ p 1 [ p 2 [ p 3 PTH ] ] ]
> 20> F = 10
> 20> T = 11
> 20> P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> TARGET go F T P
>
> ****** 20 ******
> F = 10 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> ****************
> BIND8 go 10 11 [ p 1 [ p 2 [ p 3 PTH ] ] ] 20
> FETCH2 P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> RESETTING PATH = P
> RESETTING PTH = P
> SET PATH = P
> 20>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> SET PTH = P
> 20>>> PARAMETER P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
>
> RULE 1
> 20> FROM = 10
> 20> TO = 11
> 20> P == 10
> PATH == P ==> 10
> PTH == P ==> 10
> MATCH1 go FROM TO FROM ---- go F T P
> FETCH P = [ p 1 [ p 2 [ p 3 PTH ] ] ]
> 20>> F = 10
> 20>> T = 11
> PTH-->10
> 20>> P = [ p 1 [ p 2 [ p 3 10 ] ] ]
> RESET PATH = P
> RESET PTH = P
> MATCH2 go FROM TO FROM ---- go 10 11 [ p 1 [ p 2 [ p 3 10 ] ] ]
>
> ****** 20 ******
> F = 10 T = 11 P = [ p 1 [ p 2 [ p 3 10 ] ] ] PATH = P PTH = P FROM = 10 TO = 11
> ****************
> -----------
> go FROM TO FROM :- rd FROM TO
> -----------
> ---------- BEGIN 21 ---------
> 20>> FROM = 10
> 20>> TO = 11
> GOAL rd 10 11
> PATH == P ==> [ p 1 [ p 2 [ p 3 10 ] ] ]
> PTH == P ==> [ p 1 [ p 2 [ p 3 10 ] ] ]
> TARGET rd 10 11
>
> ****** 21 ******
> F = 10 T = 11 P = [ p 1 [ p 2 [ p 3 10 ] ] ] PATH = [ p 1 [ p 2 [ p 3 10 ] ] ] PTH = [ p 1 [ p 2 [ p 3 10 ] ] ] FROM = 10 TO = 11
> ****************
>
> ****** 20 ******
> F = 10 T = 11 P = [ p 1 [ p 2 [ p 3 10 ] ] ] PATH = P PTH = P FROM = 10 TO = 11
> ****************
>
> ****** 8 ******
> F = 3 T = 11 P = [ p 1 [ p 2 [ p 3 PTH ] ] ] PATH = [ p 1 [ p 2 [ p 3 PTH ] ] ] PTH = [ p 1 [ p 2 [ p 3 PTH ] ] ] FROM = 3 TO = 11 MID = 10
> ****************
>
> ****** 5 ******
> F = 2 T = 11 PTH = P PATH = P P = [ p 1 [ p 2 PTH ] ] FROM = 2 TO = 11
> ****************
>
> ****** 2 ******
> F = 1 T = 11 PATH = P FROM = 1 TO = 11 P = [ p 1 PTH ]
> ****************
>
>
> YES
>
> PATH = [ p 1 [ p 2 [ p 3 10 ] ] ]


Click here to read the complete article

devel / comp.lang.prolog / Re: Creating A PATH in miniPROLOG

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor