--- layout: fc_discuss_archives title: Message 23 from Frama-C-discuss on October 2014 ---
2014-10-24 9:53 GMT+02:00 George Lee <georgeleeliangwei at gmail.com>: > I have tried this too and it works. > > Now I have this burning question: why does "logic" work in this case and "ghost" fails? > What is the main difference between the two? > > As I am new to Frama-C and am learning how to use it, any explanation here will be greatly appreciated. Thanks! > logic and ghost are two very different things: logic introduces a logic constant, which is immutable by definition (there is no execution of anything in the pure, logical world), while ghost declares a C global variable, which is treated as any other global and in particular might be modified during the execution of the program (despite its const qualifier, since as previously mentionned you're always only a cast away from being able to modify a const variable). Best regards, -- E tutto per oggi, a la prossima volta Virgile