2021-01-27 12:07 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000932Frama-CKernelpublic2014-02-12 16:58
Reportersignoles 
Assigned Tosignoles 
PrioritylowSeveritytweakReproducibilityalways
StatusclosedResolutionfixed 
Product VersionFrama-C Carbon-20110201 
Target VersionFixed in VersionFrama-C Oxygen-20120901 
Summary0000932: Journalisation of dynamic functions using abstract types does not work
DescriptionAll in the title...
Steps To ReproduceWith the attached files, run:

$ frama-c -load-script cpt.ml -load-script use.ml -journal-enable

Then read the generated journal.
Additional InformationFor fixing this issue, the journal must generate "let module" in such cases.
TagsNo tags attached.
Attached Files
  • ? file icon use.ml (391 bytes) 2011-08-23 16:09 -
    let main () =
      let module T = Type.Abstract(struct let name = "Cpt.t" end) in
      let c = 
        Dynamic.get ~plugin:"Cpt" "mk" (Datatype.func Datatype.unit T.ty) () 
      in
      let incr = 
        Dynamic.get ~plugin:"Cpt" "incr" (Datatype.func T.ty Datatype.int) 
      in
      Format.printf "%d@." (incr c);
      Format.printf "%d@." (incr c);
      Format.printf "%d@." (incr c)
    
    let () = Db.Main.extend main
      
    
    ? file icon use.ml (391 bytes) 2011-08-23 16:09 +

-Relationships
+Relationships

-Notes

~0002163

signoles (manager)

Seem not possible to load 2 different files... Here is cpt.ml:

let mk () = ref 0
let incr c = incr c; !c

include Datatype.Make(struct
  (* order of lines below does matter *)
  include Datatype.Serializable_undefined
  include Datatype.Ref(Datatype.Int)
  let name = "Cpt.t"
end)

let mk =
  Dynamic.register
    ~journalize:true
    ~plugin:"Cpt"
    "mk"
    (Datatype.func Datatype.unit ty) mk

let incr =
  Dynamic.register
    ~journalize:true
    ~plugin:"Cpt"
    "incr"
    (Datatype.func ty Datatype.int)
    incr

~0003343

signoles (manager)

Generating "let module" in journal is pretty cool :).

~0004629

signoles (manager)

Fix committed to stable/neon branch.
+Notes

-Issue History
Date Modified Username Field Change
2011-08-23 16:09 signoles New Issue
2011-08-23 16:09 signoles Status new => assigned
2011-08-23 16:09 signoles Assigned To => signoles
2011-08-23 16:09 signoles File Added: use.ml
2011-08-23 16:10 signoles Note Added: 0002163
2011-08-23 16:10 signoles Status assigned => confirmed
2012-07-31 11:48 svn
2012-07-31 11:48 svn Status confirmed => resolved
2012-07-31 11:48 svn Resolution open => fixed
2012-07-31 11:48 signoles Note Added: 0003343
2012-09-19 17:15 signoles Fixed in Version => Frama-C Oxygen-20120901
2012-09-19 17:16 signoles Status resolved => closed
2013-12-19 01:11 signoles Source_changeset_attached => framac master 34e2e221
2014-02-12 16:53 signoles Source_changeset_attached => framac stable/neon 34e2e221
2014-02-12 16:58 signoles Note Added: 0004629
2014-02-12 16:58 signoles Status closed => resolved
+Issue History