Il giorno 27/ago/2013, alle ore 17.57, Gabriel Kerneis ha scritto:

> Dear all,
> 
> I have just merged my work on CIL plugins into the "develop" branch of
> the git repository. This is of interest to anybody who writes his own
> CIL features (previously configured using EXTRA_FEATURES).

This is great news - well, at least for me. Can't wait for the 2.0. In the 
meantime I downloaded the head revision from the git repository and followed 
the gist, but I have some problem. The situation is exemplified by this code 
snippet:

(*foo.ml*)
open Cil
open Feature

let feature : Feature.t =
  { fd_name = "foo";
    fd_enabled = false;
    fd_description = "foo description";
    fd_extraopt = [];
    fd_post_check = true;
    fd_doit =
      function (f: file) -> Simplemem.feature.fd_doit f ;
  }
let () = Feature.register feature

This is the result of the compilation: 

$ ocamlbuild -use-ocamlfind -package cil foo.cma foo.cmxs
+ /usr/bin/ocamlfind ocamlc -c -package cil -o foo.cmo foo.ml
File "foo.ml", line 23, characters 10-27:
Error: Unbound module Simplemem
Command exited with code 2.
Compilation unsuccessful after building 2 targets (0 cached) in 00:00:00.

How do I invoke a feature from another one? In the case my question denotes 
complete ignorance of OCaml I admit my fault, but still kindly ask for some 
hint.
Thank you in advance
Pietro

> 
> The CIL documentation has not been updated yet. It will of course be
> updated before the 2.0 release, but this might take a while.
> 
> In the meantime, I have published a small "gist" containing a README and
> a sample CIL plugin:
> 
>  https://gist.github.com/kerneis/6353215#file-readme-md
> 
> You can get the code with git:
> 
>  git clone https://gist.github.com/kerneis/6353215
> 
> Updating your features from a previous version to a plugin should be
> very straightforward. Just follow the instructions in the gist above.
> 
> I'm reasonably happy with the API and UI, but I'd really like people to
> test this as much as possible and argue about it before the next
> release. Let's try and break things only once.
> 
> Best regards,
> -- 
> Gabriel
> 
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> CIL-users mailing list
> CIL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cil-users


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to