anchor.diff:      [true] = language:run([Sig|[Sig|[Sig|[Sig|[Sig|B]]]]], 3000).
   testK(EPub, Priv) ->
   %This is a weighted multisig that uses the commit-reveal data structure, so that the participants can reveal simultaniously.
  -%only include signatures from participants who are in the same direction. 
  -    %Needs updates.
  -    % input def1 def2 def4 2 Sig1 Func1 1 Sig2a Sig2b Func2a Func2b 0 2 Sig4 Func4
  +%only include signatures from participants who are in the same direction. Use a 0 to replace people who didn't participate.
  +    % input def2 0 Sig2 Func2
  +    %option 0 is for a validator who did not sign, adds to bottom.
  +    Func = <<" integer 1 integer 1337 ">>,
  +   DFunc = << <<" : func " >>/binary, Func/binary, <<" ; ">>/binary >>,
  +    C = hash:doit(compile(Func)),
  +    Sig = base64:encode(sign:sign(C, Priv)),
  +    A = compile(<< DFunc/binary, <<" integer 0 ">>/binary, 
  +      <<" binary ">>/binary, Sig/binary, <<" binary ">>/binary, (base64:encode(C))/binary, <<" :m A >r dup integer 0 == if integer 0 >r else dup tuck binary ;
  +:m B verify_sig or_die integer 1337 commit_reveal 
  +  integer 1 == not if crash else then dup r@ >r then drop ;
  +integer 3 A ">>/binary, EPub/binary, <<" B 
  +integer 2 A ">>/binary, EPub/binary, <<" B
  +integer 0 integer 0
  +r> + swap r> + swap r> + swap r> + swap 
  +">>/binary >>),
  +    [3, 5] = language:run(A, 1000),
  +    % verify_sig
  +    % commit_reveal integer 1337
  +    % function call integer 1 = not if crash else then
  +    % > 2/3
  +    ok.
  +testL(EPub, Priv) ->
  +%This is a weighted multisig that uses the commit-reveal data structure, so that the participants can reveal simultaniously.
  +%only include signatures from participants who are in the same direction.
  +    %Needs updates
  +    % input def1 def2 def4 Sig1 Func1 2 Sig2a Sig2b Func2a Func2b 1 0 Sig4 Func4 2
       %option 2 is for reading in a signature, adds to top and bottom.
       %option 0 is for a validator who did not sign, adds to bottom.
       %option 1 is for a validator who double-signed, increases N. Look at testI for this one.
  
positive.code: to_opcodes([<<"or_die">>|R], F, Out) ->
      %( bool -- )
      %if bool is true, ignore. if bool is false, then crash.
      X = [19, 18, 28, 17, 23],%in reverse order because Out is all reverse.
      %X = [not, if, crash, else, then] %in correct order
      to_opcodes(R, F, X ++ Out);
  to_opcodes([<<"commit_reveal">>|[C|[A|R]]], F, Out) ->
      %( Function -- )
      %" integer 3 match D drop integer -1 not if crash else then "
      %This opcode verifies that a hash references a function of the commit-reveal variety. If not, it crashes.
      D  = flip(to_opcodes([C, A], F, [])),%C, A could be a binary, or an integer.
      X = [{integer, -10}, 10] ++ D ++ [42, {integer, 3}],% -10 is the code for any integer.
      to_opcodes(R, F, X ++ Out);
  to_opcodes([], _, Out) -> flip(Out);
  to_opcodes([Name|R], Functions, Out) ->
      case dict:find(Name, Functions) of
  
negative.code: -module(compiler).
  -export([compile/1, test/0]).
  
  %-define(or_die, [19, 18, 28, 17, 23]).%in reverse order because Out is all reverse. 
  -define(or_die, compile(<<" not if crash else then ">>)).
  -define(commit_reveal, compile(<<" swap dup integer 2 match integer -10 integer -10 or_die call rot == or_die ">>)).% -10 is the code for any integer.
     % here is code to punish people for signing contrary results. This contract would be used to stop oracles from outputing 2 contrary results.
     % func1 != func2
     % Verify that internal pub signed over each func.
     % make sure func1 and func2 are of the correct form.
     % func1(0) != func2(0)
  -define(double_signed_slash, compile(<<"
            N !
            >r 
            2dup N @ commit_reveal >r
                 N @ commit_reveal r> 
            == not or_die
  	  swap tuck r@ 
  	  verify_sig or_die r>
            verify_sig or_die
  ">>)).
  compile(A) ->
      B = << <<" ">>/binary, A/binary, <<" \n">>/binary>>,
      C = remove_comments(B),
  