Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Your computer account is overdrawn. Please see Big Brother.


devel / comp.lang.prolog / add [ s [s 0] ] - [ s [s 0] ] .................... debugging HARD

SubjectAuthor
o add [ s [s 0] ] - [ s [s 0] ] .................... debugging HARDGraham Cooper

1
add [ s [s 0] ] - [ s [s 0] ] .................... debugging HARD

<e1b84d28-d4b0-4f73-a201-67e5467fb61cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.prolog
X-Received: by 2002:a05:622a:1806:b0:3e6:6502:16b2 with SMTP id t6-20020a05622a180600b003e6650216b2mr4188962qtc.12.1682875802936;
Sun, 30 Apr 2023 10:30:02 -0700 (PDT)
X-Received: by 2002:a25:a2d0:0:b0:b99:535c:3619 with SMTP id
c16-20020a25a2d0000000b00b99535c3619mr9662120ybn.6.1682875802682; Sun, 30 Apr
2023 10:30:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.prolog
Date: Sun, 30 Apr 2023 10:30:02 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8004:11a0:3cee:99c0:9b97:7e4c:4c8c;
posting-account=EsDGawkAAAAN6xcF2fi-X0yb3ECD-3_I
NNTP-Posting-Host: 2001:8004:11a0:3cee:99c0:9b97:7e4c:4c8c
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e1b84d28-d4b0-4f73-a201-67e5467fb61cn@googlegroups.com>
Subject: add [ s [s 0] ] - [ s [s 0] ] .................... debugging HARD
From: grahamco...@gmail.com (Graham Cooper)
Injection-Date: Sun, 30 Apr 2023 17:30:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 136
 by: Graham Cooper - Sun, 30 Apr 2023 17:30 UTC

add is super simple only 2 rules

add( X 0 ) = X

add( X Y+1 ) = Z+1
<-
add( X Y ) = Z

add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] [ s | [ s | [ s | [ s | 0 ] ] ] ]

ENGINE 0 1 add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] [ s | [ s | [ s | [ s | 0 ] ] ] ]
add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] [ s | [ s | [ s | [ s | 0 ] ] ] ]
add2 X [ s | Y ] [ s | Z ]

ANS2 9
a2:9
add2 -- add2
[ s | [ s | [ s | [ s | 0 ] ] ] ] -- X
-- [ s | Y ]
[ s | [ s | [ s | [ s | 0 ] ] ] ] -- [ s | Z ]
>>Z = [ s | [ s | [ s | 0 ] ] ]
ENGINE 9 1 add2 X Y Z
FUN:0 - 9
TAIL:1 - 1
add2 X Y Z
add2 X [ s | Y ] [ s | Z ]

ANS2 9
a2:9
add2 -- add2
X -- X
Y -- [ s | Y ]
Z -- [ s | Z ]
FOUND RECURSIVE POINT

r*9*1---

___________________

STACK1
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Z=[ s | [ s | [ s | 0 ] ] ] Y=[ s | Y ]
__________________
UPTO1
9 1
FORWARD
RECURSION 0
add2 X Y Z
LAST ANSWER 0
> X = [ s | [ s | [ s | [ s | 0 ] ] ] ]
> Y = [ s | Y ]
> Z = [ s | [ s | [ s | 0 ] ] ]
SAVE VARS 0
add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] [ s | Y ] [ s | [ s | [ s | 0 ] ] ]
add2 X [ s | Y ] [ s | Z ]

ANSWER: 9
RETRIEVE VARS 1

[ s | [ s | [ s | [ s | 0 ] ] ] ] >> X
>>Y = Y
>>Y = Y
>>Z = [ s | [ s | 0 ] ]
GOBACK
BLANKVARS
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Y=Y Z=[ s | [ s | 0 ] ]
__________________
UPTO1
9 1
FORWARD
RECURSION 0
add2 X Y Z
LAST ANSWER 0
> X = [ s | [ s | [ s | [ s | 0 ] ] ] ]
> Y = Y
> Z = [ s | [ s | 0 ] ]
SAVE VARS 0
add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] Y [ s | [ s | 0 ] ]
add2 X [ s | Y ] [ s | Z ]

ANSWER: 9
RETRIEVE VARS 1
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Z=[ s | [ s | [ s | 0 ] ] ] Y=[ s | Y ]
[ s | [ s | [ s | [ s | 0 ] ] ] ] >> X
Y << [ s | Y ]
>>Z = [ s | 0 ]
GOBACK
BLANKVARS
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Z=[ s | 0 ] Y=[ s | Y ]
__________________
UPTO1
9 1
FORWARD
RECURSION 0
add2 X Y Z
LAST ANSWER 0
> X = [ s | [ s | [ s | [ s | 0 ] ] ] ]
> Y = [ s | Y ]
> Z = [ s | 0 ]
SAVE VARS 0
add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] [ s | Y ] [ s | 0 ]
add2 X [ s | Y ] [ s | Z ]

ANSWER: 9
RETRIEVE VARS 1
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Y=Y Z=[ s | [ s | 0 ] ]
[ s | [ s | [ s | [ s | 0 ] ] ] ] >> X
>>Y = Y
>>Y = Y
>>Z = 0
GOBACK
BLANKVARS
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Y=Y Z=0
__________________
UPTO1
9 1
FORWARD
RECURSION 0
add2 X Y Z
LAST ANSWER 0
> X = [ s | [ s | [ s | [ s | 0 ] ] ] ]
> Y = Y
> Z = 0
SAVE VARS 0
add2 [ s | [ s | [ s | [ s | 0 ] ] ] ] Y 0

NO ANSWER
X=[ s | [ s | [ s | [ s | 0 ] ] ] ] Y=Y Z=0
RETRIEVEVARS3 -1

NO


devel / comp.lang.prolog / add [ s [s 0] ] - [ s [s 0] ] .................... debugging HARD

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor