csci2041/repo-zhan4854/Hwk_06_Assessment.md
Michael Zhang 399845160c
f
2018-01-29 17:35:31 -06:00

5.2 KiB

Assessment for Homework 06

This is the automated grading for Homework 06. If you feel these results are incorrect, please email the course alias at csci2041@umn.edu. Furthermore, regrade requests on this assignment will not be run after the date of the final.

Total score: 16 / 17

Run on April 28, 14:08:48 PM.

  • Pass: Change into directory "Hwk_06".

Feedback for tautology.ml

  • Pass: Check that file "tautology.ml" exists.

  • Pass: Check that an OCaml file "tautology.ml" has no syntax or type errors.

    OCaml file "tautology.ml" has no syntax or type errors.

eval
  • 1 / 1 : Pass: Check that the result of evaluating

    eval (And ( Prop "P", Prop "Q")) [("P",true); ("Q",false)]
    

    matches the pattern false.

  • 1 / 1 : Pass: Check that the result of evaluating

    eval (And ( Prop "P", Prop "Q")) [("P",true); ("Q",true)]
    

    matches the pattern true.

  • 1 / 1 : Pass: Check that the result of evaluating

    eval (Or (Prop "P", Or (Prop "Q", Prop "R"))) [("P",false); ("Q",false); ("R",false)]
    

    matches the pattern false.

  • 1 / 1 : Pass: Check that the result of evaluating

    eval (Or (Prop "P", Or (Prop "Q", Prop "R"))) [("P",false); ("Q",false); ("R",true)]
    

    matches the pattern true.

  • 1 / 1 : Pass: Check that the result of evaluating

    eval (Or (Prop "P", Or (Prop "Q", Not (Prop "R")))) [("P",false); ("Q",false); ("R",true)]
    

    matches the pattern false.

  • 1 / 1 : Pass: Check that the result of evaluating

    eval (Or (Prop "P", Or (Prop "Q", Not (Prop "R")))) [("P",false); ("Q",false); ("R",false)]
    

    matches the pattern true.

freevars
  • 1 / 1 : Pass: Check that the result of evaluating

    List.exists ( (=) "P" ) (freevars (And (Prop "P", Prop "Q")))
    

    matches the pattern true.

  • 1 / 1 : Pass: Check that the result of evaluating

    List.exists ( (=) "Q" ) (freevars (Or (Prop "P", Prop "Q")))
    

    matches the pattern true.

  • 1 / 1 : Pass: Check that the result of evaluating

    List.length (freevars (And ( Prop "P", Or (Prop "Q", Prop "P"))))
    

    matches the pattern 2.

  • 1 / 1 : Pass: Check that the result of evaluating

    freevars (And (True, False))
    

    matches the pattern [ ].

is_tautology
  • 1 / 1 : Pass: Check that the result of evaluating

    let f = Or (Prop "P", Not (Prop "P")) in
       match is_tautology f (fun s -> Some s) with 
         | None -> "yes" 
         | Some _ -> "no"
    

    matches the pattern "yes".

  • 1 / 1 : Pass: Check that the result of evaluating

    let f = Or (Or (Not (Prop "P"), Prop "Q"), Or (Not (Prop "Q"), Prop "P")) in
       match is_tautology f (fun s -> Some s) with 
         | None -> "yes" 
         | Some _ -> "no"
    

    matches the pattern "yes".

  • 1 / 1 : Pass: Check that the result of evaluating

    let f = Or (Prop "P", Prop "Q") in
       match is_tautology f (fun s -> Some s) with 
         | None -> "yes" 
         | Some _ -> "no"
    

    matches the pattern "no".

  • 1 / 1 : Pass: Check that the result of evaluating

    let f = And (Prop "P", Prop "Q") in
       match is_tautology f (fun s -> Some s) with 
         | None -> "yes" 
         | Some _ -> "no"
    

    matches the pattern "no".

  • 1 / 1 : Pass: Check that the result of evaluating

    let f = And (Prop "P", Prop "Q") in
       match is_tautology f (fun s -> Some s) with 
         | None -> "yes" 
         | Some subst when eval f subst = false -> "no" 
         | Some _ -> "fail, error in is_tautology or eval" 
    

    matches the pattern "no".

  • 1 / 1 : Pass: Check that the result of evaluating

    let f = And (Not (Prop "P"), Or (Prop "Q", Prop "P")) in
       match is_tautology f (fun s -> Some s) with 
         | None -> "yes" 
         | Some subst when eval f subst = false -> "no" 
         | Some _ -> "fail, error in is_tautology or eval" 
    

    matches the pattern "no".

Feedback for maze.ml

  • Pass: Check that file "maze.ml" exists.

  • Fail: Check that an OCaml file "maze.ml" has no syntax or type errors.

    OCaml file maze.ml has errors.

    Run "ocaml maze.ml" to see them.

    Make sure that you are using ocaml version 4.02.3. Run "ocaml -version" to check the version number. Check the specification from Lab 5 again if you are still having problems with this.

  • 0 / 1 : Skip: Check that the result of evaluating

    (maze () = Some [ (2,3); (1,3); (1,2); (2,2); (3,2); (3,3); (3,4); (4,4); (4,5); (3,5) ]) ||
    (maze () = Some [ (2,3); (1,3); (1,2); (2,2); (3,2); (3,3); (4,3); (5,3); (5,2); (5,1) ]) ||
    (maze () = Some [ (2,3); (1,3); (1,4); (1,5); (2,5); (2,4); (3,4); (3,3); (4,3); (5,3); (5,2); (5,1) ]) ||
    (maze () = Some [ (2,3); (1,3); (1,4); (1,5); (2,5); (2,4); (3,4); (4,4); (4,5); (3,5) ])
    

    matches the pattern true.

This test was not run because of an earlier failing test.

Total score: 16 / 17