<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>VCC</title><link>http://vcc.codeplex.com/project/feeds/rss</link><description>VCC is a mechanical verifier for concurrent C programs. VCC takes a C program, annotated with function specifications, data invariants, loop invariants, and ghost code, and tries to prove these annotations correct. </description><item><title>Updated Wiki: Install</title><link>https://vcc.codeplex.com/wikipage?title=Install&amp;version=11</link><description>&lt;div class="wikidoc"&gt;&lt;h1&gt;VCC Installation&lt;/h1&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;The following prerequisites are needed to successfully run VCC:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;.Net v4.0 or later&lt;/b&gt; - &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=17851"&gt;Download installer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;F# 2.0 Redistributable&lt;/b&gt; - &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=5f0a79f8-925f-4297-9ae2-86e2fdcff33c&amp;amp;displaylang=en"&gt;Download installer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;F# Power Pack&lt;/b&gt; -  &lt;a href="https://fsharppowerpack.codeplex.com/downloads/get/122710"&gt;Download installer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Microsoft Visual C++ 2010 Redistributable Package&lt;/b&gt; - &lt;a href="http://www.microsoft.com/de-de/download/details.aspx?id=5555"&gt;Download installer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Visual Studio 2010 or 2012&lt;/b&gt; (any edition with C++ support). Note, however, that the express editions are not recommended, because they will not allow you to use VCC from the IDE. &lt;a href="http://www.microsoft.com/visualstudio/11"&gt;Download installer.&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;Once you have all the required prerequisites you can download the latest installer or VCC using the link on the right hand side of this web page, or the Downloads tab above.&lt;br /&gt;&lt;br /&gt;If you want to run VCC from the IDE, you need to have the VCC headers in your included paths. (The installer adds them for the command-line, but these are not picked up by Visual Studio). To add the VCC headers to your path in the IDE, do the following after installing VCC:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Run visual studio, and create a new empty C++ project.&lt;/li&gt;
&lt;li&gt;Click view-&amp;gt;Other Windows-&amp;gt;PropertyManager. This should open the property manager for your project.&lt;/li&gt;
&lt;li&gt;In the property manager, if you only want to add the paths for this project, double-click on the project name to open up its property sheet. If you want to add the paths for all projects, click on the triangle next to the project name to open up its configurations (probably (Debug | Win32) and (Release | Win32)), open up (Debug | Win32) and double-click on Microsoft.Cpp.Win32.User.&lt;/li&gt;
&lt;li&gt;In the property sheet, click on &amp;quot;VC++ Directories&amp;quot;, click on &amp;quot;Include Directories&amp;quot;, click on the down-arrow on the right hand side of the directory list, and click &amp;quot;edit&amp;quot;. &lt;/li&gt;
&lt;li&gt;Click on the little folder icon to add a new directory, and add $(INCLUDE). Alternatively, navigate to Program Files (x86)\Microsoft Research\Vcc\Headers, and click &amp;quot;select folder&amp;quot; to add it to the path. (The (x86) will be in this path only if you are running 64 bit Windows.)&lt;/li&gt;&lt;/ol&gt;
&lt;br /&gt;After you have done this, check that your installation works:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Go to the solution explorer pane&lt;/li&gt;
&lt;li&gt;Right-click on the project (not the solution) and choose &amp;quot;add-&amp;gt;New Item&amp;quot;. Choose &amp;quot;C++ file&amp;quot;, and choose a file name (e.g. test.c) in the box below, but give it the extension .c. Click &amp;quot;add&amp;quot;.&lt;/li&gt;
&lt;li&gt;The new file should open up in the code editor. Add the following text to the window:&lt;/li&gt;&lt;/ol&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
#include &amp;lt;vcc.h&amp;gt;

&lt;span style="color:Blue;"&gt;void&lt;/span&gt; test() {
}
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Right-click on the function and choose &amp;quot;Verify test.c&amp;quot;. After a moment, you should see &amp;quot;Verification succeeded&amp;quot; in the lower-left-hand corner of the IDE.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>erniecohen</author><pubDate>Fri, 17 May 2013 14:00:21 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Install 20130517020021P</guid></item><item><title>New Post: Doxygen</title><link>http://vcc.codeplex.com/discussions/443220</link><description>&lt;div style="line-height: normal;"&gt;Hi all,&lt;br /&gt;
&lt;br /&gt;
does anybody know how to set doxygen to skip anotations in code?&lt;br /&gt;
&lt;br /&gt;
I set up doxygen C preprocessor in config.doxygen like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = _(x)=&lt;/code&gt;&lt;/pre&gt;

which seems working, but I am not sure if is it correct. Does anybody have some experience with this?&lt;br /&gt;
&lt;br /&gt;
Thanks a lot&lt;br /&gt;
Jan&lt;br /&gt;
&lt;/div&gt;</description><author>PEPE89</author><pubDate>Fri, 10 May 2013 09:21:46 GMT</pubDate><guid isPermaLink="false">New Post: Doxygen 20130510092146A</guid></item><item><title>New Post: Funtion calls modify global variables</title><link>http://vcc.codeplex.com/discussions/435345</link><description>&lt;div style="line-height: normal;"&gt;Hi Mark,&lt;br /&gt;
&lt;br /&gt;
Thank you very much!!&lt;br /&gt;
&lt;br /&gt;
It really helps! I confused &amp;quot;the context pointed by s&amp;quot; and &amp;quot;the pointer s itself&amp;quot; at the beginning. And I'm thinking for foo3(), I also didn't mention \gemb(&amp;amp;s) in the requirement. Why the function call of malloc() works properly in this function? This makes me confuse.&lt;br /&gt;
&lt;br /&gt;
Thanks very much for helping.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
&lt;br /&gt;
Shu Cheng&lt;br /&gt;
&lt;/div&gt;</description><author>Hare</author><pubDate>Thu, 02 May 2013 19:12:29 GMT</pubDate><guid isPermaLink="false">New Post: Funtion calls modify global variables 20130502071229P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Hi Mark,&lt;br /&gt;
&lt;br /&gt;
Thanks very much!&lt;br /&gt;
&lt;br /&gt;
I added an requirement, _(requires \malloc_root(N)), for dispose(). And it works!&lt;br /&gt;
&lt;br /&gt;
Best,&lt;br /&gt;
&lt;br /&gt;
Shu Cheng&lt;br /&gt;
&lt;/div&gt;</description><author>Hare</author><pubDate>Thu, 02 May 2013 19:03:48 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130502070348P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  non-NULL pointers return by malloc() satisfy the \malloc_root() predicate, which is requires in calls to free(). You need to keep track of this information, until free() is called in the dispose() function (e.g., by adding it as an invariant of struct A and as a requirement to dispose()).&lt;br /&gt;
&lt;br /&gt;
  Hope that helps, Mark&lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Thu, 02 May 2013 18:09:47 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130502060947P</guid></item><item><title>New Post: Funtion calls modify global variables</title><link>http://vcc.codeplex.com/discussions/435345</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  sorry, in my earlier post, instead of &amp;quot;with explicitly mentioning [the object]&amp;quot; I meant &amp;quot;without explicitly mentioning [the object]&amp;quot;. So foo() would stay without a postcondition. However, to take advantage of VCC framing, in foo1(), you would need to state something on the enclosing object of your global pointer 's', e.g., &lt;br /&gt;
&amp;quot;_(requires \wrapped(\emb(&amp;amp;s)))&amp;quot;. This would allow you to derive that 's' remains unchanged after foo() is called (even though the specification of foo() does not mention 's').&lt;br /&gt;
&lt;br /&gt;
  If I understand you correctly, foo() would correspond to malloc(), so this would be fine.&lt;br /&gt;
&lt;br /&gt;
  Hope that helps, Mark&lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Thu, 02 May 2013 17:54:39 GMT</pubDate><guid isPermaLink="false">New Post: Funtion calls modify global variables 20130502055439P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;&lt;strong&gt;MarkHillebrand wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
  no, I was only suggesting to change the _(writes ...) clause in actualize() and dispose(), the other annotations looked fine to me.&lt;br /&gt;
&lt;br /&gt;
  Cheers, Mark&lt;br /&gt;
&lt;/blockquote&gt;
Hi Mark,&lt;br /&gt;
&lt;br /&gt;
I tried to verify this code. I got a error issued about free(_(A *) N) of function dispose(A *N). VCC tried to prove N is returned by malloc(). What should I do to handle this?&lt;br /&gt;
&lt;br /&gt;
Best, Shu Cheng&lt;br /&gt;
&lt;/div&gt;</description><author>Hare</author><pubDate>Thu, 02 May 2013 17:45:20 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130502054520P</guid></item><item><title>New Post: Funtion calls modify global variables</title><link>http://vcc.codeplex.com/discussions/435345</link><description>&lt;div style="line-height: normal;"&gt;Hi Mark,&lt;br /&gt;
&lt;br /&gt;
Thanks very much for your reply.&lt;br /&gt;
&lt;br /&gt;
The thread you mentioned is my another thread. I understand that and in the code here I also mentioned that if I have said something special in the post-condition for foo(), the proof would be fine. But my question is the system function calls, like malloc(), in the library, it is impossible to know which global variables I have in the code. In this case, it is impossible to state the pointers of global variables stay the same as post-condition for malloc(). And I'd like to know what happen here. Because if I have lots of global variables, it would be boring to have ensures clause for each of them to keep them unchanged.&lt;br /&gt;
&lt;br /&gt;
Thanks very much. &lt;br /&gt;
&lt;br /&gt;
Best,&lt;br /&gt;
&lt;br /&gt;
Shu Cheng&lt;br /&gt;
&lt;/div&gt;</description><author>Hare</author><pubDate>Thu, 02 May 2013 16:01:25 GMT</pubDate><guid isPermaLink="false">New Post: Funtion calls modify global variables 20130502040125P</guid></item><item><title>New Post: error VC9502: Call 'stack_free()</title><link>http://vcc.codeplex.com/discussions/440336</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  the old writes clause introduced an inconsistency, which made the proof seemingly run through. (Hint: &amp;quot;vcc /smoke&amp;quot; should have complained about it).&lt;br /&gt;
&lt;br /&gt;
  With regards to the latest assertion failure you need to strengthen the loop invariants. VCC doesn't know that the fields of L are writable anymore after L was unwrapped earlier. &amp;quot;_(invariant \mutable(L))&amp;quot; may fix that.&lt;br /&gt;
&lt;br /&gt;
  Cheers, Mark &lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Sat, 27 Apr 2013 05:22:14 GMT</pubDate><guid isPermaLink="false">New Post: error VC9502: Call 'stack_free() 20130427052214A</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  no, I was only suggesting to change the _(writes ...) clause in actualize() and dispose(), the other annotations looked fine to me.&lt;br /&gt;
&lt;br /&gt;
  Cheers, Mark&lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Sat, 27 Apr 2013 05:10:17 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130427051017A</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Mark, if I understant you right you suppose something like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;typedef struct A {  
    struct A *x;  
} A;

void init(A *N) 

_(writes \extent(N)) 
{
    N-&amp;gt;x = NULL; 
} 

void actualize(A *N) 

_(writes N)
{
    N-&amp;gt;x = NULL;  
} 

void dispose(A *N) 

_(writes N)
{
    free(_(A*)N);
} 

int main() 
{ 
    A *N = (A*) malloc(sizeof(A));
    _(assume N)

    init(N);
    _(assume N-&amp;gt;x == NULL)

    actualize(N);

    dispose(N);
}&lt;/code&gt;&lt;/pre&gt;

BUT its still the same case --&amp;gt; problem with &lt;em&gt;(write) clause:&lt;br /&gt;
&lt;br /&gt;
Verification of init succeeded. [0,62]&lt;br /&gt;
Verification of actualize failed. [0,11]&lt;br /&gt;
error VC8507: Assertion 'N-&amp;gt;x is writable' did not verify.&lt;br /&gt;
Verification of dispose failed. [0,79]&lt;br /&gt;
error VC8510: Assertion '\extent(p) is writable in call to free(&lt;/em&gt;(A*)N)' did not verify.&lt;br /&gt;
error VC9502: Call 'free(_(A*)N)' did not verify.&lt;br /&gt;
error VC9599: (related information) Precondition: 'the extent of the object being reclaimed is mutable'.&lt;br /&gt;
error VC9599: (related information) Precondition: 'the pointer being reclaimed was returned by malloc()'.&lt;br /&gt;
Verification of main failed. [0,12]&lt;br /&gt;
error VC8510: Assertion 'N is writable in call to actualize(N)' did not verify.&lt;br /&gt;
error VC8510: Assertion 'N is writable in call to dispose(N)' did not verify.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Jan&lt;br /&gt;
&lt;/div&gt;</description><author>PEPE89</author><pubDate>Fri, 26 Apr 2013 19:11:28 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130426071128P</guid></item><item><title>New Post: error VC9502: Call 'stack_free()</title><link>http://vcc.codeplex.com/discussions/440336</link><description>&lt;div style="line-height: normal;"&gt;Ok Mark,&lt;br /&gt;
&lt;br /&gt;
I changed specification of DisposeList() function like below, but now I cant change values of abstract variables and fields of L, which I need for abstract representation of list. Sorry that I didnt mention them in previous post.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;    void DisposeList (tList *L)

    _(requires \wrapped(L))
    _(requires \thread_local(L))
    _(writes L)
    _(ensures L-&amp;gt;size == 0)
    _(ensures L-&amp;gt;values == \lambda int a; \false) 
    _(decreases 0)
    {
        tElem *hlp_p1 = NULL;
        tElem *hlp_p2 = NULL;

        _(unwrap L)

        hlp_p1 = L-&amp;gt;First;
        L-&amp;gt;First = NULL;
        L-&amp;gt;Last = NULL;

        while (hlp_p1 != NULL)

        _(invariant hlp_p1 ==&amp;gt; hlp_p1 \in L-&amp;gt;\owns &amp;amp;&amp;amp; hlp_p1 \in \domain(L))
        _(decreases 0)
        {
            hlp_p2 = hlp_p1-&amp;gt;Nextptr;
            free(_(tElem*) hlp_p1);
            hlp_p1 = hlp_p2;
        }

        _(ghost { 
            L-&amp;gt;\owns = {}; 
            L-&amp;gt;size = 0;
            L-&amp;gt;values = (\lambda int k; \false);
            _(ghost L-&amp;gt;find = (\lambda int k; (tElem *) NULL))
        })
    }&lt;/code&gt;&lt;/pre&gt;

Now I get:&lt;br /&gt;
 error VC8510: Assertion '\span(obj) is writable in call to L-&amp;gt;\owns = {}' did not verify.&lt;br /&gt;
 error VC9502: Call 'L-&amp;gt;\owns = {}' did not verify.&lt;br /&gt;
 error VC9599: (related information) Precondition: 'the owner is mutable'.&lt;br /&gt;
&lt;br /&gt;
So therefore I thought i need \span(L). Thanks&lt;br /&gt;
&lt;br /&gt;
Jan&lt;br /&gt;
&lt;/div&gt;</description><author>PEPE89</author><pubDate>Fri, 26 Apr 2013 18:54:45 GMT</pubDate><guid isPermaLink="false">New Post: error VC9502: Call 'stack_free() 20130426065445P</guid></item><item><title>New Post: error VC9502: Call 'stack_free()</title><link>http://vcc.codeplex.com/discussions/440336</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  I guess this is (partially?) answered by the other discussion (malloc() can fail; DisposeList() should only write L, not \span(L)).&lt;br /&gt;
&lt;br /&gt;
  Cheers, Mark&lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Fri, 26 Apr 2013 18:03:25 GMT</pubDate><guid isPermaLink="false">New Post: error VC9502: Call 'stack_free() 20130426060325P</guid></item><item><title>New Post: Funtion calls modify global variables</title><link>http://vcc.codeplex.com/discussions/435345</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  your global pointer is a variable of primitive type and thus has an implicit object wrapped around it (cf. the previous discussion &lt;a href="https://vcc.codeplex.com/discussions/405153" rel="nofollow"&gt;https://vcc.codeplex.com/discussions/405153&lt;/a&gt;). You can derive that the pointer stays the same if you reason with this enclosing object. For example, if you know the enclosing object is wrapped and not written to (by functions you call), you can derive that the pointer stays the same with explicitly mentioning it in functions such as foo().&lt;br /&gt;
&lt;br /&gt;
  Hope this helps, Mark&lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Fri, 26 Apr 2013 18:00:44 GMT</pubDate><guid isPermaLink="false">New Post: Funtion calls modify global variables 20130426060044P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
  _(writes \span(N)) and _(requires \wrapped(N)) are contradictory - you can't have an object wrapped and at the same time have its fields writable. It should work when you use _(writes N) in actualize() and dispose().&lt;br /&gt;
&lt;br /&gt;
  Hope that helps, Mark&lt;br /&gt;
&lt;/div&gt;</description><author>MarkHillebrand</author><pubDate>Fri, 26 Apr 2013 17:48:24 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130426054824P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Ok thanks Shu,&lt;br /&gt;
&lt;br /&gt;
 it helps, but I have the same problem with next function after init(), again _(writable) clause, it seems I need to somehow set N for main function and keep it, but how?&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;typedef struct A {  
    struct A *x;  
} A;

void init(A *N) 

_(writes \extent(N)) 
_(ensures \wrapped(N))
{
    N-&amp;gt;x = NULL; 
    _(wrap N)
} 

void actualize(A *N) 

_(writes \span(N))
_(maintains \wrapped(N))
{
    _(unwrapping N){
        N-&amp;gt;x = NULL;    
    }
} 

void dispose(A *N) 

_(writes \span(N))
_(requires \wrapped(N))
{
    _(unwrap N)
    free(_(A*)N);
} 

int main() 
{ 
    A *N = (A*) malloc(sizeof(A));
    _(assume N)

    init(N);

    actualize(N);

    dispose(N);
}&lt;/code&gt;&lt;/pre&gt;

VCC:&lt;br /&gt;
error VC8510: Assertion '\span(N) is writable in call to actualize(N)' did not verify.&lt;br /&gt;
error VC8510: Assertion '\span(N) is writable in call to dispose(N)' did not verify.&lt;br /&gt;
&lt;br /&gt;
Thanks for any suggestion.&lt;br /&gt;
Jan&lt;br /&gt;
&lt;/div&gt;</description><author>PEPE89</author><pubDate>Fri, 26 Apr 2013 08:41:31 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130426084131A</guid></item><item><title>New Post: Funtion calls modify global variables</title><link>http://vcc.codeplex.com/discussions/435345</link><description>&lt;div style="line-height: normal;"&gt;Can no one have any idea about this? Or where can I found any resources about this?&lt;br /&gt;
&lt;br /&gt;
Thanks very much!&lt;br /&gt;
&lt;br /&gt;
Best,&lt;br /&gt;
Shu Cheng&lt;br /&gt;
&lt;/div&gt;</description><author>Hare</author><pubDate>Thu, 25 Apr 2013 17:29:02 GMT</pubDate><guid isPermaLink="false">New Post: Funtion calls modify global variables 20130425052902P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;This is because your pointer N in main() isn't writable. It's a NULL pointer. Following main() may help&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;int main() {
    A * N = (A *) malloc(sizeof(A));
    _(assume N) // malloc() may fail
    init (N);
}&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>Hare</author><pubDate>Thu, 25 Apr 2013 17:20:20 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130425052020P</guid></item><item><title>New Post: _(writes) clause error VC8510</title><link>http://vcc.codeplex.com/discussions/441401</link><description>&lt;div style="line-height: normal;"&gt;Hi all,&lt;br /&gt;
&lt;br /&gt;
I got this error in simple function, I am not sure what I am doing wrong. Do anybody know what I am missing?&lt;br /&gt;
&lt;br /&gt;
error VC8510: Assertion '\extent(N) is writable in call to init(N)' did not verify.&lt;br /&gt;
&lt;br /&gt;
This error occurs even if I use \span(N) in write clause or just type _(writes N-&amp;gt;x).&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;vcc.h&amp;gt; 
#include &amp;lt;stdlib.h&amp;gt;

typedef struct A { 
 
    struct A *x; 
    struct A *y; 
 
} A;

void init(A *N) 

_(writes \extent(N)) 

{
    N-&amp;gt;x = NULL;    
} 

int main() 
{ 
    A *N = NULL;

    init(N);
}
&lt;/code&gt;&lt;/pre&gt;

Thanks Jan.&lt;br /&gt;
&lt;/div&gt;</description><author>PEPE89</author><pubDate>Wed, 24 Apr 2013 09:23:15 GMT</pubDate><guid isPermaLink="false">New Post: _(writes) clause error VC8510 20130424092315A</guid></item><item><title>New Post: error VC9502: Call 'stack_free()</title><link>http://vcc.codeplex.com/discussions/440336</link><description>&lt;div style="line-height: normal;"&gt;Thanks Mark a lot,&lt;br /&gt;
&lt;br /&gt;
if I understand you right, i should destroy &amp;quot;list&amp;quot; before the end of test_01() function. So I can call my DisposeList() function:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;void test_01(void)
{
   tList *list = malloc(sizeof(tList));

   InitList(list);  

   DisposeList(list);
    
}&lt;/code&gt;&lt;/pre&gt;

inside DisposeList() I just destroy nodes of the list one by other in while loop, inside looks like this:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;void DisposeList (tList *L)

_(requires \wrapped(L))
_(requires \thread_local(L))
_(writes \span(L))
_(ensures L-&amp;gt;First == NULL &amp;amp;&amp;amp; L-&amp;gt;Last == NULL)
_(ensures \wrapped(L))
_(decreases 0)

{
    tElem *hlp_p1 = NULL;
    tElem *hlp_p2 = NULL;

    _(unwrapping L) {

        hlp_p1 = L-&amp;gt;First;
        L-&amp;gt;First = NULL;
        L-&amp;gt;Last = NULL;

        while (hlp_p1 != NULL)

        _(invariant hlp_p1 ==&amp;gt; hlp_p1 \in L-&amp;gt;\owns &amp;amp;&amp;amp; hlp_p1 \in \domain(L))
        _(decreases 0)
        {
            hlp_p2 = hlp_p1-&amp;gt;Nextptr;
            free(_(tElem*) hlp_p1);
            hlp_p1 = hlp_p2;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;

So I think I would destroy the &amp;quot;list&amp;quot; properly, but now I am getting these errors:&lt;br /&gt;
&lt;br /&gt;
\singly_linked_list_test_vcc.c(46,3) : error VC8510: Assertion '\extent(L) is writable in call to InitList(list)' did not verify.&lt;br /&gt;
\singly_linked_list_test_vcc.c(49,3) : error VC8510: Assertion '\span(L) is writable in call to DisposeList(list)' did not verify.&lt;br /&gt;
&lt;br /&gt;
It seems there is some problem with _(write) clause. Can you help me with that please or anyone else?&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;
&lt;/div&gt;</description><author>PEPE89</author><pubDate>Tue, 23 Apr 2013 19:14:32 GMT</pubDate><guid isPermaLink="false">New Post: error VC9502: Call 'stack_free() 20130423071432P</guid></item></channel></rss>