Giter Club home page Giter Club logo

isl's Introduction

isl is a thread-safe C library for manipulating sets and relations
of integer points bounded by affine constraints.  The descriptions of
the sets and relations may involve both parameters and existentially
quantified variables.  All computations are performed in exact integer
arithmetic using GMP.

isl is released under the MIT license, but depends on the LGPL GMP
library.

Minimal compilation instructions:

	./configure
	make
	make install

If you are taking the source from the git repository, then you first
need to do

	git clone git://repo.or.cz/isl.git
	./autogen.sh

For more information, see doc/user.pod or the generated documentation.

New releases are announced on http://freecode.com/projects/isl

If you use isl, you can let me know by stacking
https://www.ohloh.net/p/isl on ohloh.

For bug reports, feature requests and questions,
contact http://groups.google.com/group/isl-development

Whenever you report a bug, please mention the exact version of isl
that you are using (output of "./isl_cat --version").  If you are unable
to compile isl, then report the git version (output of "git describe")
or the version included in the name of the tarball.

If you use isl for your research, you are invited do cite
the following paper and/or the paper(s) describing the specific
operations you use.

@incollection{Verdoolaege2010isl,
   author = {Verdoolaege, Sven},
   title = {isl: An Integer Set Library for the Polyhedral Model},
   booktitle = {Mathematical Software - ICMS 2010},
   series = {Lecture Notes in Computer Science},
   editor = {Fukuda, Komei and Hoeven, Joris and Joswig, Michael and
		Takayama, Nobuki},
   publisher = {Springer},
   isbn = {978-3-642-15581-9},
   pages = {299-302},
   volume = {6327},
   year = {2010}
}

isl's People

Contributors

tobiasgrosser avatar inducer avatar svenvh avatar ftynse avatar agroesslinger avatar sebpop avatar albertcohen avatar alexander-matz avatar aisoard avatar bpradelle avatar pouchet avatar mingwandroid avatar rbaghdadi avatar ssb83 avatar bondhugula avatar

Stargazers

HPC_Amateur avatar 未央 avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

Forkers

tobiasgrosser

isl's Issues

cpp: consider thread_local isl::ctx object

Essentially, isl::ctx is used as a "global" state for thread-safety reasons. We may want to declare one thread_local isl::ctx and use it implicitly in all functions that require a context.

cpp: export callbacks with custom return types

Current callback support assumes callbacks return isl_stat, which is not remotely the case everywhere.
In particular, schedule tree traversals and ast_build may return either isl_bool or the same type as the first argument of the callback.

[cpp] export container types

Was there any attempt to export container types like isl_*_list and isl_*_to_* ?

I can see either some conversion to std::vector and std::unordered_map, or exposing STL-style iterators from otherwise opaque classes.

[cpp] export isl_printer functionality

It can fit a custom stream object, similarly to std::stringstream, which has state and can accept any relevant objects using operator <<. This way, it will be possible to configure the output formats of the isl_printer. The different between printer_to_file and printer_to_str can be resolved, e.g., with inheritance. It would be nice if printer_to_str behaved similarly to std::stringstream. Finally, callbacks accepting/returning a printer object can accept/return a stream object instead, which is compatible with C++ notion of a stream.

cpp: export isl_id

Exporting isl_id is non-trivial as it takes a void* user pointer. I wonder if there are better ways to export this function than just exposing the userpointer?

@nicolasvasilache : Your private branch has a managed_isl branch and I can see some templated version of isl_id which you developed. Any idea who wrote the code, if this is automated and if this is something we could upstream.

This currently blocks me from exposing most of the list stuff.

cpp: define isl::managed_copy() overload

I found myself writing
isl::manage(isl_whatever_copy(o)); // manage releases!
multiple times.

Can we generate an overloaded function

isl::whatever managed_copy(__isl_keep isl_whatever *w) {
  return isl::manage(isl_whatever_copy(w));
}

as a shortcut for these cases?

[cpp] Support for all the enums

Currently, only isl::stat is supported. We can follow the same strategy as isl::stat and all enums to isl.h.top and generate appropriate static_casts while generating methods. We need to decide on names of enums as the simple rule of removing type name from enums will result in C++ default keywords for some like isl_ast_node_for, isl_ast_node_if etc..

cpp: interface with exceptions

What would be the best way to add support for exceptions in the interface? Generate different bindings with a flag to generator?

Ideally, I would like to have meaningful messages inside exceptions. For example, include messages passed to isl_die. The main problem is that internal memory management relies on the errors being propagated until the user call through isl_stat/isl_bool or null pointers to do some cleenups. So we cannot just throw on isl_die. We could try to copy the message into the isl_ctx and then query it, similarly to errno in POSIX. This would complicate the wrapper functions and make them do the following:

  • find the ctx of their arguments;
  • do the call and check if it did not return error/null (except if marked as __isl_null);
  • if did return error, query the context and throw
  • stack unwinding should take care of clearing the relevant C++ wrappers.
    This requires that all functions that may fail could obtain the context from their arguments. Is this the case?

Any other thoughts?

cpp: make isl objects compatible with standard containers.

In particular, std::set and std::map expect objects to be less-than-comparable and std::unordered_set and std::unordered_map to have a specialization of std::hash.

C++11 stuff could go in a separate file that is conditionally included based on the C++ version.

cpp: isl::ctx implicit conversion to isl_ctx*

Memory management and lifetime of isl_ctx objects seems quite different from the ones that islpp automatically extracts. Let's not pretend the API should be the same (i.e. get, release etc), it feels more confusing than anything else.
From skimming through uses of isl::ctx it seems it is alway used with .release().
How about dropping all these raw pointer accessors and just implicitly convert to isl_ctx* ?

cpp: force static functions

Currently, the exported function is made static if its first argument is of a different type than its expected surrounding class (determined from the function name prefix).

There are "constructing" functions which make more sense as static rather than as instance functions, but with current generator it seems impossible to make them static. In particular, space construction:
isl_space_map_from_domain_and_range(isl_space *, isl_space *) makes more sense if translated as
isl::space::map_from_domain_and_range(domain, range) and not as domain.map_from_domain_and_range(range). Same goes for, e.g., isl_space_set_from_params.

I would suggest an extra tag __isl_export_ensure_static that forces the generator to produce a static function even if the function would be instance function otherwise. The danger here is to avoid a mixup with all the implicitly static functions with only __isl_export.

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.