similar to: [LLVMdev] improving the ocaml binding's type safety

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] improving the ocaml binding's type safety"

2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
Hi Erick, On 2008-03-15, at 04:03, Erick Tryzelaar wrote: > I was talking to Gordon on #llvm earlier, and he challenged me with > coming up with a way to improve the ocaml binding's type safety. I > think I got an easy solution with phantom types. This could be a good step. I'm not sure I can predict all of the implications; I'd suggest you work up a proof of concept.
2008 Mar 15
3
[LLVMdev] improving the ocaml binding's type safety
So just to compare, here are two different typesafe phantom type implementations. One is bottom down, the other bottom up. This is an example of the following functions: string Value::getName() bool Constant::isNull() bool GlobalValue::isDeclaration() bool GlobalVariable::isGlobalConstant() bool Function::isVarArg() Driver code: val make_constant : unit -> llconstant t val
2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
On Mar 15, 2008, at 17:49, Erick Tryzelaar wrote: > The other way is top down. This lets us extend our types, but > sacrifices some type safety, as we're saying that the arguments are > a superset of the variants. We can control this by limiting who can > create 't's: > > type 'a t > > type llvalue = [ `Value ] > type llconstant = [ llvalue |
2010 Feb 16
2
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
On Mon, Feb 15, 2010 at 11:47 PM, Jon Harrop <jon at ffconsultancy.com> wrote: > There are at least two other significant users of LLVM's OCaml bindings, > AFAIK. I'm writing an llvm backend/repl for felix, but it's pretty early. > My only gripe with LLVM's OCaml bindings is the way an error caught on the > LLVM side causes my program to die in a way that the
2008 Mar 16
0
[LLVMdev] improving the ocaml binding's type safety
On Sat, Mar 15, 2008 at 7:33 PM, Gordon Henriksen <gordonhenriksen at mac.com> wrote: > After some experimentation, I'd prefer the closed system. LLVM has some type > peculiarities like the commonality between CallInst and InvokeInst. I find > that the closed type system lets me express such constraints more naturally. > Expressing these constraints explicitly in the open
2010 Feb 16
0
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
On Tuesday 16 February 2010 03:51:00 Jianzhou Zhao wrote: > Does anyone know if there is any realistic project using LLVM-OCaml > Bindings? I've written a VM in OCaml built upon LLVM using LLVM's OCaml bindings: http://www.ffconsultancy.com/ocaml/hlvm/ There are at least two other significant users of LLVM's OCaml bindings, AFAIK. > How is the performance? Performance
2010 Feb 16
3
[LLVMdev] LLVM-OCaml Bindings Tutorial (2.6-2.7)
Attached are updated LLVM-OCaml Bindings Tutorial from Chris Wailes. (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-April/021804.html) We changed them to work with the latest APIs(LLVM2.6 and the latest LLVM from SVN). Does anyone know if there is any realistic project using LLVM-OCaml Bindings? How is the performance? Jianzhou -------------- next part -------------- A non-text attachment was
2012 Oct 23
4
[LLVMdev] Here need your help
Hi all when i compiled llvm-3.0 with icedtea1.11.4 together,A memory_barrier error happened ,And now I write to all of you for the following questions need your help and suggestion : 1, Is any function which can replace the "make_function" in the following function, 2 , Or is there any different paramters in make_function with the similar action with the following one
2008 Mar 16
2
[LLVMdev] improving the ocaml binding's type safety
Erick, After some experimentation, I'd prefer the closed system. LLVM has some type peculiarities like the commonality between CallInst and InvokeInst. I find that the closed type system lets me express such constraints more naturally. Expressing these constraints explicitly in the open system involves annotating the C++ class hierarchy with extra variants which are unnecessary in
2010 Feb 18
0
[LLVMdev] ocaml survey
On Thursday 18 February 2010 20:51:40 Erick Tryzelaar wrote: > I'm in the process of finishing up the ocaml llvm bindings, and I had > some last minute questions before we code freeze: > > 1. What version of ocaml is everyone using, and how old of an ocaml > version do you need to support? I'm on OCaml 3.11.1 but I have no preferences. > 2. Would it be alright if I
2010 Feb 19
0
[LLVMdev] ocaml survey
On Feb 18, 2010, at 12:51, Erick Tryzelaar wrote: > > I'm in the process of finishing up the ocaml llvm bindings, and I had > some last minute questions before we code freeze: > > 1. What version of ocaml is everyone using, and how old of an ocaml > version do you need to support? Still using OCaml 3.11.1, but will but upgrading to OCaml 3.11.2 around the same time as the
2010 Feb 18
6
[LLVMdev] ocaml survey
I'm in the process of finishing up the ocaml llvm bindings, and I had some last minute questions before we code freeze: 1. What version of ocaml is everyone using, and how old of an ocaml version do you need to support? 2. Would it be alright if I renamed some functions? Module providers are being removed for 2.7. I can keep the old functions around, but I'd prefer to keep the API clean.
2007 Nov 27
0
[LLVMdev] Fibonacci example in OCaml
On Monday 26 November 2007 20:05, Gordon Henriksen wrote: > On Nov 26, 2007, at 14:18, Jon Harrop wrote: > > On Monday 26 November 2007 16:21, Gordon Henriksen wrote: > >> Unfortunately, even if the bindings were more strongly typed, it > >> would still be structurally possible to build invalid LLVM code, so > >> you've just got to take care not to violate
2007 Nov 27
1
[LLVMdev] Fibonacci example in OCaml
On 2007-11-26, at 21:12, Jon Harrop wrote: > Provide a type enumerating the valid terminators and restrict the > last instruction in a block to be a terminator. Something like this: > > type terminator = [ `ret of llvalue | `br of llvalue ] > type instruction = > [ terminator > | `add of llvalue * llvalue > | `sub of llvalue * llvalue ] > type block
2010 Aug 18
0
[LLVMdev] a typo in OCaml bindings
Hi, revision 111418 binding/ocaml/llvm/llvm_ocaml.c /* llvalue -> int -> llvalue */ CAMLprim value llvm_params(LLVMValueRef Fn, value Index) { value Params = alloc(LLVMCountParams(Fn), 0); LLVMGetParams(Fn, (LLVMValueRef *) Op_val(Params)); return Params; } does not match the interface at binding/ocaml/llvm/llvm.ml external params : llvalue -> llvalue array =
2013 Jan 14
0
[LLVMdev] OCaml binding: error with the function "has_metadata"
Hi all, I am using the OCaml binding and I get the following error with the function "Llvm.has_metadata": Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file .../llvm-3.2.src/include/llvm/Support/Casting.h, line 208. Abort trap: 6 I am using the latest 3.2 release from the LLVM download page and this is a
2012 Oct 04
2
How to build a list with missing values? What is missing, anyway?
This is tangentially related to Hadley's question. Suppose I'm building a function programmatically; I have assembled an expression for the body and I know the names of the arguments it wants to take. Suppose I have some convenience function such that writing make_function(alist(a=, b=), quote(a+b), environment()) is equivalent to writing function(a,b) a+b So how do I make the
2010 Aug 17
0
[LLVMdev] Ocaml bindings in 2.8
Hello Jianzhou, On Sat, Aug 14, 2010 at 8:25 PM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote: > Hi, > > Does 2.8 release plan to change anything in Ocaml bindings? > http://llvm.org/docs/ReleaseNotes.html#whatsnew does not list any > relevant features. I usually wait until around nowish before a release to sync llvm-c and the ocaml bindings. I'll start the process.
2010 Aug 15
4
[LLVMdev] Ocaml bindings in 2.8
Hi, Does 2.8 release plan to change anything in Ocaml bindings? http://llvm.org/docs/ReleaseNotes.html#whatsnew does not list any relevant features. 2.7 added 'operand' that can access each operand from a value. external operand : llvalue -> int -> llvalue = "llvm_operand" Does this binding also expose a primitive to return how many operands a given value has? I need
2008 Dec 31
0
[LLVMdev] llvm ocaml bindings
Hi, thanks Chris and Gordon for the fantasic infrastructure and ocaml bindings and Erick for the prompt response! I'm looking to use LLVM to write program analyses for C/C++ programs, but to use Ocaml to write the analyses. I did see there were bindings for iterating over: * functions in a module [iter_functions] * basic blocks in a functions [iter_blocks] * instructions in a block