Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math

Topic: phpPROLOG 1st INFINITE LOOP!
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
INFINITY POWER

Posts: 117
Registered: 11/1/11
phpPROLOG 1st INFINITE LOOP!
Posted: Jun 30, 2013 9:37 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


PHPPROLOG V1.2 beta
APPS GAMES DEMOS LESSONS COMPUTER LAB

TRACE
str [ n X ]?




....

Here is the PROGRAM, someone deleted my BASE STEP!

X V 1 str [ n S ] :-
str S

X V 2 str [ start here ]



Dreamhost are going to kill me putting a PROLOG Serer on a shared Webhost
account!

The 1st run executed 3900 Prolog rules before the 30 second PHP timeout!

.......

Musatov might like this!




PUSH: 0 .... V X .... REF :22 .... TERM | 0..0


************************
* 1 str
* 21 n
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - n ...
LEFT: 2 - S - * - 22 - ...
GV:1
GOAL PUSH: 1 .... V X .... REF 22: .... TERM S1 | 1..1

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
RIGHT: 2 - - n - 21 - n ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 2 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 3 .... V S1 .... REF 2:1 .... TERM n | 3..3

LEFT: 2 - S - * - 22 - ...
GV:3
GOAL PUSH: 4 .... V S1 .... REF 2:2 .... TERM S2 | 3..3

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 5 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 6 .... V S1 .... REF 2:1 .... TERM n | 6..6

LEFT: 2 - S - * - 22 - ...
GV:6
GOAL PUSH: 7 .... V S2 .... REF 2:2 .... TERM S3 | 6..6

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 8 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 9 .... V S1 .... REF 2:1 .... TERM n | 9..9

LEFT: 2 - S - * - 22 - ...
GV:9
GOAL PUSH: 10 .... V S3 .... REF 2:2 .... TERM S4 | 9..9

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 11 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 12 .... V S1 .... REF 2:1 .... TERM n | 12..12

LEFT: 2 - S - * - 22 - ...
GV:12
GOAL PUSH: 13 .... V S4 .... REF 2:2 .... TERM S5 | 12..12

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 14 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 15 .... V S1 .... REF 2:1 .... TERM n | 15..15

LEFT: 2 - S - * - 22 - ...
GV:15
GOAL PUSH: 16 .... V S5 .... REF 2:2 .... TERM S6 | 15..15

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 17 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 18 .... V S1 .... REF 2:1 .... TERM n | 18..18

LEFT: 2 - S - * - 22 - ...
GV:18
GOAL PUSH: 19 .... V S6 .... REF 2:2 .... TERM S7 | 18..18

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 20 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 21 .... V S1 .... REF 2:1 .... TERM n | 21..21

LEFT: 2 - S - * - 22 - ...
GV:21
GOAL PUSH: 22 .... V S7 .... REF 2:2 .... TERM S8 | 21..21

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 23 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 24 .... V S1 .... REF 2:1 .... TERM n | 24..24

LEFT: 2 - S - * - 22 - ...
GV:24
GOAL PUSH: 25 .... V S8 .... REF 2:2 .... TERM S9 | 24..24

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 26 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 27 .... V S1 .... REF 2:1 .... TERM n | 27..27

LEFT: 2 - S - * - 22 - ...
GV:27
GOAL PUSH: 28 .... V S9 .... REF 2:2 .... TERM S10 | 27..27

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 29 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 30 .... V S1 .... REF 2:1 .... TERM n | 30..30

LEFT: 2 - S - * - 22 - ...
GV:30
GOAL PUSH: 31 .... V S10 .... REF 2:2 .... TERM S11 | 30..30

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 32 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 33 .... V S1 .... REF 2:1 .... TERM n | 33..33

LEFT: 2 - S - * - 22 - ...
GV:33
GOAL PUSH: 34 .... V S11 .... REF 2:2 .... TERM S12 | 33..33

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 35 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 36 .... V S1 .... REF 2:1 .... TERM n | 36..36

LEFT: 2 - S - * - 22 - ...
GV:36
GOAL PUSH: 37 .... V S12 .... REF 2:2 .... TERM S13 | 36..36

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 38 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 39 .... V S1 .... REF 2:1 .... TERM n | 39..39

LEFT: 2 - S - * - 22 - ...
GV:39
GOAL PUSH: 40 .... V S13 .... REF 2:2 .... TERM S14 | 39..39

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 41 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
* 1 str
************************


LEFT: 2 - - str - 1 - str ...
LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 42 .... V S1 .... REF 2:1 .... TERM n | 42..42

LEFT: 2 - S - * - 22 - ...
GV:42
GOAL PUSH: 43 .... V S14 .... REF 2:2 .... TERM S15 | 42..42

NUM HEAD VARS:1
VARSTACK: S:22
RIGHT: 2 - - str - 1 - str ...
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 44 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
************************


LEFT: 2 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 45 .... V S1 .... REF 1: .... TERM str | 45..45

LEFT: 2 - - n - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 46 .... V S1 .... REF 2:1 .... TERM n | 45..45

LEFT: 2 - S - * - 22 - ...
GV:45
GOAL PUSH: 47 .... V S15 .... REF 2:2 .... TERM S16 | 45..45

NUM HEAD VARS:1
VARSTACK: S:22
TRY 1
str [ n S ]

TRM: str
TRM: S
PUSH: 48 .... V S .... REF :2 .... TERM | 0..0
TAIL 1
str S
str S


************************
************************

FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 49 .... V S1 .... REF 1: .... TERM str | 45..45

***DOUBLE*** 46

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 50 .... V S1 .... REF 2:1 .... TERM start | 45..45

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 50 .... V S1 .... REF 1: .... TERM str | 42..42

***DOUBLE*** 50

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 51 .... V S1 .... REF 2:1 .... TERM start | 42..42

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 51 .... V S1 .... REF 1: .... TERM str | 39..39

***DOUBLE*** 51

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 52 .... V S1 .... REF 2:1 .... TERM start | 39..39

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 52 .... V S1 .... REF 1: .... TERM str | 36..36

***DOUBLE*** 52

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 53 .... V S1 .... REF 2:1 .... TERM start | 36..36

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 53 .... V S1 .... REF 1: .... TERM str | 33..33

***DOUBLE*** 53

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 54 .... V S1 .... REF 2:1 .... TERM start | 33..33

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 54 .... V S1 .... REF 1: .... TERM str | 30..30

***DOUBLE*** 54

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 55 .... V S1 .... REF 2:1 .... TERM start | 30..30

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 55 .... V S1 .... REF 1: .... TERM str | 27..27

***DOUBLE*** 55

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 56 .... V S1 .... REF 2:1 .... TERM start | 27..27

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 56 .... V S1 .... REF 1: .... TERM str | 24..24

***DOUBLE*** 56

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 57 .... V S1 .... REF 2:1 .... TERM start | 24..24

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 57 .... V S1 .... REF 1: .... TERM str | 21..21

***DOUBLE*** 57

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 58 .... V S1 .... REF 2:1 .... TERM start | 21..21

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 58 .... V S1 .... REF 1: .... TERM str | 18..18

***DOUBLE*** 58

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 59 .... V S1 .... REF 2:1 .... TERM start | 18..18

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 59 .... V S1 .... REF 1: .... TERM str | 15..15

***DOUBLE*** 59

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 60 .... V S1 .... REF 2:1 .... TERM start | 15..15

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 60 .... V S1 .... REF 1: .... TERM str | 12..12

***DOUBLE*** 60

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 61 .... V S1 .... REF 2:1 .... TERM start | 12..12

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 61 .... V S1 .... REF 1: .... TERM str | 9..9

***DOUBLE*** 61

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 62 .... V S1 .... REF 2:1 .... TERM start | 9..9

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 62 .... V S1 .... REF 1: .... TERM str | 6..6

***DOUBLE*** 62

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 63 .... V S1 .... REF 2:1 .... TERM start | 6..6

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL

LEFT: 4 - - str - 1 - ...
nextref:X REF:22 HR: 1

GOAL PUSH: 63 .... V S1 .... REF 1: .... TERM str | 3..3

***DOUBLE*** 63

LEFT: 4 - - start - 21 - ...
nextref:X REF:22 HR: 21

GOAL PUSH: 64 .... V S1 .... REF 2:1 .... TERM start | 3..3

***DOUBLE*** 47

NUM HEAD VARS:0 FALSE 1
FAIL



STACK: 1 - X - :22 - *
STACK: 2 - X - 22: - S1
STACK: 3 - S1 - :2 - *
STACK: 4 - S1 - 2:1 - n
STACK: 5 - S1 - 2:2 - S2
STACK: 6 - S2 - :2 - *
STACK: 7 - S1 - 2:1 - n
STACK: 8 - S2 - 2:2 - S3
STACK: 9 - S3 - :2 - *
STACK: 10 - S1 - 2:1 - n
STACK: 11 - S3 - 2:2 - S4
STACK: 12 - S4 - :2 - *
STACK: 13 - S1 - 2:1 - n
STACK: 14 - S4 - 2:2 - S5
STACK: 15 - S5 - :2 - *
STACK: 16 - S1 - 2:1 - n
STACK: 17 - S5 - 2:2 - S6
STACK: 18 - S6 - :2 - *
STACK: 19 - S1 - 2:1 - n
STACK: 20 - S6 - 2:2 - S7
STACK: 21 - S7 - :2 - *
STACK: 22 - S1 - 2:1 - n
STACK: 23 - S7 - 2:2 - S8
STACK: 24 - S8 - :2 - *
STACK: 25 - S1 - 2:1 - n
STACK: 26 - S8 - 2:2 - S9
STACK: 27 - S9 - :2 - *
STACK: 28 - S1 - 2:1 - n
STACK: 29 - S9 - 2:2 - S10
STACK: 30 - S10 - :2 - *
STACK: 31 - S1 - 2:1 - n
STACK: 32 - S10 - 2:2 - S11
STACK: 33 - S11 - :2 - *
STACK: 34 - S1 - 2:1 - n
STACK: 35 - S11 - 2:2 - S12
STACK: 36 - S12 - :2 - *
STACK: 37 - S1 - 2:1 - n
STACK: 38 - S12 - 2:2 - S13
STACK: 39 - S13 - :2 - *
STACK: 40 - S1 - 2:1 - n
STACK: 41 - S13 - 2:2 - S14
STACK: 42 - S14 - :2 - *
STACK: 43 - S1 - 2:1 - n
STACK: 44 - S14 - 2:2 - S15
STACK: 45 - S15 - :2 - *
STACK: 46 - S1 - 1: - str
STACK: 47 - S1 - 2:1 - n
STACK: 48 - S15 - 2:2 - S16
STACK: 49 - S16 - :2 -
STACK: 50 - S1 - 1: - str
STACK: 51 - S1 - 1: - str
STACK: 52 - S1 - 1: - str
STACK: 53 - S1 - 1: - str
STACK: 54 - S1 - 1: - str
STACK: 55 - S1 - 1: - str
STACK: 56 - S1 - 1: - str
STACK: 57 - S1 - 1: - str
STACK: 58 - S1 - 1: - str
STACK: 59 - S1 - 1: - str
STACK: 60 - S1 - 1: - str
STACK: 61 - S1 - 1: - str
STACK: 62 - S1 - 1: - str
STACK: 63 - S1 - 1: - str
STACK: 64 - S1 - 1: - str
str [ n X ]?
NOT FOUND!








Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.