Frama-C Bug Tracking System - Frama-C
View Issue Details
0000668Frama-CPlug-in > slicingpublic2011-01-12 12:492014-02-12 16:55
lukaszc 
signoles 
normalmajoralways
closedwon't fix 
Frama-C Carbon-20101202-beta2 
Frama-C Nitrogen-20111001 
0000668: Redirecting the output to a file does not work
when I use -slice-print - correct code is rendered on the screen -slice-print -ocode x.c - correct code is rendered on the screen but the file is not created -slice-print -print -ocode x.c - correct code is rendered on the screen but in the file there is different, not sliced code So I do not see a way to redirect the sliced code to a file other than redirecting the whole console output with different messages.
No tags attached.
related to 0000687closed signoles Losing some cmdline option settings when loading 
Issue History
2011-01-12 12:49lukaszcNew Issue
2011-01-12 12:49lukaszcStatusnew => assigned
2011-01-12 12:49lukaszcAssigned To => Anne
2011-01-12 13:18AnneNote Added: 0001382
2011-01-12 13:18AnneStatusassigned => acknowledged
2011-01-14 11:15patrickNote Added: 0001383
2011-01-14 11:26patrickStatusacknowledged => assigned
2011-01-14 11:26patrickAssigned ToAnne => patrick
2011-01-14 14:03svnCheckin
2011-01-14 14:25svnCheckin
2011-01-14 15:07svnCheckin
2011-01-14 15:11patrickNote Added: 0001387
2011-01-14 16:42svnCheckin
2011-01-14 16:43svnCheckin
2011-02-16 11:12signolesRelationship addedrelated to 0000687
2011-02-16 11:15signolesNote Added: 0001506
2011-02-16 11:15signolesAssigned Topatrick => signoles
2011-02-16 11:15signolesStatusassigned => acknowledged
2011-02-16 11:15signolesTarget Version => Frama-C Nitrogen-20110901
2011-03-21 16:32patrickNote Edited: 0001387
2011-05-16 17:10signolesRelationship addedrelated to 0000707
2011-09-30 13:35signolesNote Added: 0002366
2011-09-30 13:35signolesStatusacknowledged => closed
2011-09-30 13:35signolesResolutionopen => won't fix
2011-09-30 14:47svnCheckin
2011-09-30 14:51svnCheckin

Notes
(0001382)
Anne   
2011-01-12 13:18   
In the messages printed on the screen, you can see first : [slicing] exporting project to 'Slicing export'... and then : [sparecode] removed unused global declarations in new project 'Slicing export (without unused globals)' It means that the result is in the project named 'Slicing export (without unused globals)', and you can do : -then-on 'Slicing export (without unused globals)' -print -ocode x.c but I must confess that it should be possible to provide a better name to the project ! I will try to add a slicing option to do that.
(0001383)
patrick   
2011-01-14 11:15   
I'm quite sure that -slice-print -ocode x.c worked fine with first versions of Frama-C. It could be a regression problem.
(0001387)
patrick   
2011-01-14 15:11   
(edited on: 2011-03-21 16:32)
Now the command is: -then-on 'Slicing export' -print -ocode x.c Options have been added for naming the internal slicing project, and the exported frama-c project Lets go for the remaining problem: -slice-print -ocode x.c should pretty print the exported AST into the file x.c
(0001506)
signoles   
2011-02-16 11:15   
Would be solved in a more general way to be implemented for the next Frama-C major release.
(0002366)
signoles   
2011-09-30 13:35   
Option -slice-print is now deprecated. The nominal way to print the resulting AST is now: -then-on 'Slicing export' -print If you want to redirect the output into a file add -ocode file.i: -then-on 'Slicing export' -print -ocode file.i