Change hw6 to an unsolved version.

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2025-01-24 23:10:01 -08:00
parent 0c04936ccf
commit ee01a8f5b2
186 changed files with 9605 additions and 4019 deletions

View file

@ -7,7 +7,7 @@ module Opt = Oat.Opt
module Backend = Oat.Backend
exception Ran_tests
let suite = ref (Studenttests.provided_tests @ Gradedtests.graded_tests)
let suite = ref (Gradedtests.graded_tests)
let execute_tests () =
Platform.configure_os ();
@ -16,7 +16,7 @@ let execute_tests () =
raise Ran_tests
let args =
[ ("-linux", Set Platform.linux, "use linux-style name mangling [must preceed --test on linux]")
[ ("-linux", Set Platform.linux, "force linux-style name mangling [must preceed --test]")
; ("--test", Unit execute_tests, "run the test suite, ignoring other files inputs")
; ("-op", Set_string Platform.output_path, "set the path to the output files directory [default='output']")
; ("-o", Set_string executable_filename, "set the name of the resulting executable [default='a.out']")
@ -24,11 +24,10 @@ let args =
; ("-c", Clear link, "stop after generating .o files; do not generate executables")
; ("--print-ll", Set print_ll_flag, "prints the program's LL code (after lowering to clang code if --clang-malloc is set)")
; ("--print-x86", Set print_x86_flag, "prints the program's assembly code")
; ("--clang", Set clang, "compiles to assembly using clang, not the 153 backend (implies --clang-malloc)")
; ("--clang", Set clang, "compiles to assembly using clang, not the CS131 backend (implies --clang-malloc)")
; ("--execute-x86", Set execute_x86, "run the resulting executable file")
; ("-v", Set Platform.verbose, "enables more verbose compilation output")
; ("-O1", Unit (fun _ -> Opt.opt_level := 1), "enable optimization")
; ("-O2", Unit (fun _ -> Opt.opt_level := 2), "enable additional optimization")
; ("-O1", Set Opt.do_opt, "enable optimization")
; ("--regalloc", Symbol (["none"; "greedy"; "better"], Backend.set_regalloc), " use the specified register allocator")
; ("--liveness", Symbol (["trivial"; "dataflow"], Backend.set_liveness), " use the specified liveness analysis")
; ("--print-regs", Set print_regs_flag, "prints the register usage statistics for x86 code")
@ -43,8 +42,8 @@ let _ =
Platform.create_output_dir ();
try
Arg.parse args (fun filename -> files := filename :: !files)
"CS153 main test harness\n\
USAGE: ./main.native [options] <files>\n\
"CS131 main test harness\n\
USAGE: ./oatc [options] <files>\n\
see README for details about using the compiler";
Platform.configure_os ();
process_files !files