DD2452
    Homework 3
    Skip to content
    Dashboard
    • Login
    • Dashboard
    • Calendar
    • Inbox
    • Help
    Close
    • Min översikt
    • DD2452
    • Assignments
    • Homework 3
    • Home
    • Assignments
    • Pages
    • Files
    • Syllabus
    • Modules
    • Collaborations
    • Media Gallery
    • Video Recording

    Homework 3

    • Due 19 Sep 2018 by 15:15
    • Points 2
    • Submitting on paper

    Assume you are given the contract LaTeX: \left(x=x_0\:\wedge\:x\ge0,\:y=x_0!\right) ( x = x 0 ∧ x ≥ 0 , y = x 0 ! ) . Use correctness by construction (see slides for Lecture 3) to derive stepwise an algorithm with a while loop, picking as loop invariant LaTeX: y\ast x!=x_0!\:\wedge\:x\ge0 y ∗ x ! = x 0 ! ∧ x ≥ 0 .

    Show every step of your derivation (indicating which Hoare logic rule you apply), starting from a trivial tableau and ending with a fully implemented program and its proof tableau. Show also the final program without the assertions.

    1537362900 09/19/2018 03:15pm
    Additional comments:
    Rating max score to > Pts

    Rubric

     
     
     
     
     
     
     
         
    Can't change a rubric once you've started using it.  
    Find a rubric
    Find rubric
    Title
    You've already rated students with this rubric. Any major changes could affect their assessment results.
    Title
    Criteria Ratings Pts
    Edit criterion description Delete criterion row
    This criterion is linked to a learning outcome Description of criterion
    threshold: 5 pts
    Edit rating Delete rating
    5 to >0 Pts
    Full marks
    blank
    Edit rating Delete rating
    0 to >0 Pts
    No marks
    blank_2
    This area will be used by the assessor to leave comments related to this criterion.
    pts
      / 5 pts
    --
    Additional comments
    Total points: 5 out of 5