LPCIC / elpi

Embeddable Lambda Prolog Interpreter
GNU Lesser General Public License v2.1
273 stars 32 forks source link

Discr tree multivar #214

Closed FissoreD closed 1 month ago

FissoreD commented 7 months ago

Goal: if L = [1,2,3] is a list, then the corresponding path used for indexing with discrimination tree is [Cons_2, Primitive, Cons_2, Primitive, Cons_2, Primitive, Nil_0] where Cons_2 (resp Nil_0) tells that we are dealing with a constant of name Cons (resp. Nil) of arity 2 (resp. 0) In this encoding in each list, half of the size of the path is used for Cons_2 and Nil_0. With this PR, we reduce the size of the path by adding two special marker for the Head and the End of a list and remove all the Cons_2 and Nil_0. The path for the list L will be encoded as [ListHead, Primitive, Primitive, Primitive, ListEnd]

gares commented 1 month ago

It seems the branch needs to be rebased

FissoreD commented 1 month ago

It seems the branch needs to be rebased

It is ok now