Theory SumArr
section ‹Case-study›
theory SumArr
imports
"../OG_Syntax"
Word_Lib.Word_32
begin
unbundle bit_operations_syntax
type_synonym routine = nat
type_synonym word32 = "32 word"
type_synonym funcs = "string × nat"
datatype faults = Overflow | InvalidMem
type_synonym 'a array = "'a list"
text ‹Sumarr computes the combined sum of all the elements of
multiple arrays. It does this by running a number of threads in
parallel, each computing the sum of elements of one of the arrays,
and then adding the result to a global variable gsum shared by all threads.
›