Group Abstract Group Abstract

Message Boards Message Boards

[WSS22] Framework for self-referential data structures: ConsList & ConsTree

Posted 3 years ago

enter image description here

POSTED BY: Athina Kyriazi
6 Replies
POSTED BY: Dean Gladish

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
POSTED BY: Daniel Lichtblau
Posted 3 years ago
POSTED BY: Athina Kyriazi

I gather the main goal is to simulate lazy infinite evaluation. But this does look rather Lisp-like, with a linked list emulation and related functionality. If that is the intent, have you checked that the algorithmic complexity of various operations is as expected for linked lists?

POSTED BY: Daniel Lichtblau
Posted 3 years ago

The initial project title was: Make a framework for self-referential data structures. In order to build on top of the existing Wolfram built-in framework, my mentors and I decided to turn lists and trees into infinite self-referential data structures, which we handled using the logic of lazy evaluation (expanding each defined type until the needed extend). Turning a list into an infinite self-referential data structure results a type which is similar to linked lists. The prefix "Cons", which references to Lisp, was chosen in order to emphasise the self-referential attribute of the extended version of lists and trees. Regarding the algorithmic complexity this was a first attempt to alter the existing built-in functions and I don't doubt that this can be done in more efficient ways regarding the number of code lines and execution time (most possibly yes). I don't know if I answered your question. I hope I did.

POSTED BY: Athina Kyriazi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard