Skip to content

Lpy system not working on py 3.13 #57

@baugetfa

Description

@baugetfa

On python 3.13 some Lpy system give Windows fatal exception: access violation like this one:

from random import *
p1 = 0.550000 
p2 = 0.450000

Axiom: _(1)[f(50)+90f(10)]-(90)P(1,0)

derivation length: 100

# A = branching state
# B = non-branching state 

def Start():
    global m
    m = 0

production:

P(x,t) :
    if t <= 10 : produce T[G(x)]P(x,t+1)
    else  :
        global m
        m = 1
        produce *

G(x) : 
    if m==1 :
        produce +(90)S(x)

S(x) :
    if random() <= 0.5: produce A(x)
    else: produce B(x)

A(x) : 
    if random() <= p1: produce I[M(x)]A(1-x)
    else: produce IB(1-x)

B(x) :
    if random() <= p2: produce IB(1-x)
    else: produce I[M(x)]A(1-x)

homomorphism:

T :    produce ;(1)f(40);(1)@c(1)
M(x) : 
    if x==0 :   produce ;(2)+F(20)
    elif x==1 : produce ;(2)-F(20)

I    : produce ;(1)F(2)
A(x) : produce ;(1)@O(3)
B(x) : produce ;(2)@O(3)

And for instance a very simple one works like:

Axiom: A
production:
A --> A[+A]A[-A]
homomorphism:
maximum depth:2
A --> BCB
B --> F
C --> f@Of
endlsystem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions