Wiki

Ticket #263 (assigned enhancement)

Opened 13 years ago

Last modified 13 years ago

Provide Treaps implementation for cobra

Reported by: hopscc Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

As suggested in  Sept-2010 help wanted provide a cobra treaps implementation.

Attachments

Treap.cobra Download (15.2 KB) - added by hopscc 13 years ago.
TestTreap.cobra Download (10.4 KB) - added by hopscc 13 years ago.
TestTreap2.cobra Download (1.6 KB) - added by hopscc 13 years ago.
speedTreap.cobra Download (2.5 KB) - added by hopscc 13 years ago.

Change History

Changed 13 years ago by hopscc

Changed 13 years ago by hopscc

Changed 13 years ago by hopscc

Changed 13 years ago by hopscc

Changed 13 years ago by hopscc

  • owner changed from hopscc to Chuck
  • status changed from new to assigned

Genericised Treap implementation, tests, sample and speed check.
Currently implemented in its own separate namespace (Treap) but presumably eventual desire is for it to be in Cobra.Lang (?)

Changed 13 years ago by hopscc

Almost forgot:
You'll need the patch from ticket:258 applied for the Treap code to compile.

Also there was a problem with the cobra runtime generating a stack overflow
when an assertion referencing a Treap was triggered. I modified the RTL code to avoid the stackOvfl and then found and fixed the causative agent in the Treap code but I've since been unable to trigger the bug in the compiler (perhaps corrected with changeset:2452).
If anyone triggers this again please let me know (annotate this ticket with some
triggering code). I've got a code fix that works but cant reproduce the test that triggered it

It exhibited as an assertion failure which triggered an assertion/ensure exception in the toTechString call (which triggered an assertion failure which triggered an assertion exception in toTechString which ....)

Changed 13 years ago by Chuck

I have fixed/closed ticket:258 so only the latest source code should be needed to run your treaps.

Changed 13 years ago by Charles

Where should treaps go?

  • Cobra std lib
  • A new Cobra lib separate from Cobra.Lang and Cobra.Lang.Compiler
  • A new repository like at bitbucket or github
  • In the Cobra repository under Samples or Supplements

Changed 13 years ago by hopscc

Std lib or extensions lib that cobra is aware of (like stdlib and baseline .Net namespaces) without need for explicit import/reference.

Note: See TracTickets for help on using tickets.