Giter Club home page Giter Club logo

mds's People

Contributors

mattalexpugh avatar

Watchers

 avatar

mds's Issues

Make setup system-independent

Steps required:

  1. Ascertain repo directory
  2. Invoke mds makefiles
  3. Compile and install Python extensions using distutils

Update to Cython 0.27

There are some neat new features in Cython 0.27 which could be useful for the MDS Python API:

  • __richcmp__ -> __eq__ etc.
  • Python 3's type-hinting annotations
  • C++ classes containing properly refcounted PyObjects
  • Extension module initialization (?)

Namespaces

Basic namespace support is present in the Python API, numerous components still required:

  1. Type resolution for primitives (deduction)
  2. Record storing & retrieval
  3. Array storing & retrieval (downcasting?)
  4. Logical implementation of Namespace paths

Records

This is my current task -- getting these implemented. Key points:

  1. Declaration
  2. Instantiation
  3. Committing to Namespace
  4. Retrieval from Namespace

Point 4 is most interesting, as is the key point of interoperability between languages in MDS:

  1. We should have some concept of hierarchy in terms of polymorphism -- if we don't know what the concrete class C (derives A <- B <- C) actually looks like, casting it to something further up the chain (B, then A, in that order) should work until C is known -- at which point, 'cast' the returned object to C
  2. A valid type sharing the identifier I need only implement a subset of the original Records declared fields in order to be considered compatible
  3. Records are only collections of these types (record_field*) and contain no logic

Arithmetic Operations

In both primitives (and arrays thereof) we should use MDS's atomic operations for div, add, mul, sub instead of doing this in Python. This can be done with:

__i<op>__ boxing the relevant handle from MDS.

Memory management in C++ and Python

At present, *handle objects are held on the stack in their wrapper objects. This may not be too problematic given they internally have a pointer to elements on the gc_heap, but it may be more prudent to use Cython's existing shared_ptr bindings to hold these.

Further to this, where we are executing Python code through IsolationContext and Task, we need to make sure that Python's reference counting is correct on the objects returned to avoid memory leaks.

Intermittent MPGC error on repeated calls to test-cases

Steps to reproduce:

  1. Clear all MPGC heaps
  2. Create new MPGC heap (size unimportant)
  3. Run Python API tests with python -m unittest discover

If no error, simply repeat step 3:

/home/pughma/repo/public/mpgc/src/gc_thread.cpp:251: mpgc::mark_black(const mpgc::offset_ptr<const mpgc::gc_allocated>&, mpgc::gc_control_block&, mpgc::Traversal_queue&)::<lambda(const mpgc::base_offset_ptr*)>: Assertion 'ptr.is_valid()' failed.

Package hierarchy

At present, extensions are packaged/namespaced at very coarse granularity to save time in the continual recompilation during testing. A more obvious and/or natural ordering may be possible; this should be investigated before the final release is pushed upstream.

view_independent_handle exposure

There are a number of methods provided by the view_independent_handle object that currently aren't exposed (dealing with literal-templated types in current Cython requires delicate massaging). There are some useful methods that we're potentially missing, like uuid().

The simplest solution would just be to manually declare these methods in all concrete classes where we want them visible. This doesn't seem the nicest solution though; actually getting the hierarchy to resemble the C++ implementation would be good.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.