Francesco Logozzo: Programmazione per Contratti e runtime checking in .NET con i CodeContracts
- Posted: Feb 05, 2010 at 4:09 PM
- 4,824 Views
- 3 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Francesco Logozzo, ricercatore nel gruppo di ingegneria del software (RiSE) a Microsoft Research, offre una breve introduzione alla programmazione per contratti ed al progetto CodeContracts per .NET .
I CodeContracts permettono di specificare il comportamento del codice utilizzando il codice stesso.
Francesco ci spieghera’ (alla lavagna e con un demo di ispirazione ciclistica) come migliorare la qualita’ del codice e rendere il debugging piu’ efficace usando la libreria dei Contratti (inclusa in mscorlib 4.0) ed il runtime checker .
I CodeContracts possono essere scaricati con licenza industriale o accademica:
Il gruppo RiSE coordina la ricerca in ingegneria del software a Redmond negli USA.
The Research in Software Engineering team (RiSE) coordinates Microsoft's research in Software Engineering in Redmond, USA.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
interessante, pero' vedere il debugger che salta dentro e fuori dalle funzione senza + un ordine preciso di esecuzione un po mi spaventa...
Grazie.
In realta' l'ordine di valutazione e' ben preciso. Prima vengono valutate le precondizioni, poi il corpo del metodo, e quindi le postcondizioni. Quando fai l'override di un metodo, erediti anche la sua precondizione, che viene valutata prima dell'esecuzione del corpo del nuovo metodo, e la sua postcondizione, che viene valutata dopo. Il debugger ti permette di seguire la traccia d'esecuzione, e di vedere quale contratto e' violato. Nel mio esempio mi ha subito permesso di scoprire che la sottoclasse non si comporta "bene".
Ciao,
f
Si, capisco che l'ordine logico e' preciso, ma l'ordine di esecuzione nn rispetta + l'ordine di scrittura come siamo stati abituati fino ad oggi.
Ad ogni modo, bel lavoro
Remove this comment
Remove this thread
close