# HG changeset patch # User Nobuyasu Oshiro # Date 1324720414 -32400 # Node ID a967ee5a0b0fc642314ec32b1e8609a8f33c7c01 # Parent de1f203636d12d05f602acec03deabfc52cdfe63 add presen diff -r de1f203636d1 -r a967ee5a0b0f presen/.DS_Store Binary file presen/.DS_Store has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/index.html Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,318 @@ + + + + + + +2012/ 1/ 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+ +
+

Continuation based Cの GCC 4.6 上の実装について +

+
  • 大城 信康
  • +

    琉球大学 並列信頼研究室

    +
    +
    + +
    +

    目的と背景(1)

    +
  • 当研究室ではコードセグメント単位で記述するプログラミング言語Continuation based C (以下CbC)という言語を開発している。
  • +
  • コードセグメントは並列実行の単位として使うことができ、プログラムの正しさを示す単位としても使用することができる。
  • +
    + +
    +

    目的と背景(2)

    +
  • CbC のコンパイラは2008年に GCC 4.4 をベースとしたコンパイラが開発された。
  • +
  • GCC をベースとした CbC コンパイラは、GCC のアップデートに合わせ変更する必要がある。
  • +
  • 本研究ではCbC コンパイラを GCC-4.6 へとアップデートを行い、Intel64 への対応するとともに CbC の拡張を行う。
  • +
    + +
    +

    発表内容

    +
      +
    1. CbC の紹介
    2. +
    3. GCC でのコンパイルの流れ
    4. +
    5. CbC の実装
    6. + +
    7. Micro-C との性能比較
    8. +
    9. mercurial を用いたアップデートの方法
    10. +
    11. まとめ
    12. +
        +
    + +
    +

    Continuation based C

    +
  • Cの関数より細かな単位、コードセグメントを記述の基本とする。
  • +
  • コードセグメントは並列の実行単位であり、プログラムの正しさを示す単位としても使うことができる。
  • +
  • Many Core での並列実行を高い性能と高い信頼性で実現することができると考える。
  • + +
    + +
    +

    Continuation based C

    +
  • プログラムの記述は C の構文と同じだが、ループ制御や関数コールが取り除かれる。
  • +
  • 継続(goto)により次のコードセグメントへと処理を移る。
  • + + + + + + + +
    階乗を求めるCbCのプログラム
    +
    +__code print_factorial(int prod) {
    +  printf("factorial = %d\n",prod);
    +  exit(0); 
    +}
    +__code factorial0(int prod, int x) {
    +  if ( x >= 1) {
    +    goto factorial0(prod*x, x-1);
    +  }else{
    +    goto print_factorial(prod);
    +  } 
    +}
    +	  
    +
    +
    +__code factorial(int x) {
    +  goto factorial0(1, x); 
    +}
    +int main(int argc, char **argv) {
    +  int i;
    +  i = atoi(argv[1]);
    +  goto factorial(i); 
    +  return 0;
    +}
    +
    +
    +
    +
    + +
    +

    Continuation Based C (軽量継続)

    +
  • 関数コールが無い -> 呼び出し元への復帰がない
  • +
  • 継続の際にスタックに載せるデータはコードセグメントへの引数だけとなる(軽量継続)。
  • + +

    + +

    +
  • より高度に最適化されたプログラミングが可能になる。
  • +
    + +
    +

    Continuation Based C

    +
  • +
    + +
    +

    GCC によるコンパイル

    +
  • GCC についての簡単な説明を行う...
  • + +
  • CbCの実装は主に Parser の部分と RTL を生成する部分に行われる。
  • +
    + +
    +

    CbC の実装

    +
      +
    • シンタックスの追加
    • +
    • fastcall属性の付与
    • +
    • Tail Call Elimination
    • +
    • 環境付き継続
    • +
    +
    + +
    +

    シンタックスの追加

    +
      +
    • __code でコードセグメントの宣言
    • +
    • goto にコードセグメントへの継続処理を追加
    • +
    +
  • +
    + +
    +

    シンタックスの追加

    +
  • __code でコードセグメントの宣言
  • +
      +
    • __code 用idとkeywordを作成。
    • +
    • __code で宣言されるコードセグメントは void 型の関数と同じにする。
    • +
    +
    + +
    +

    シンタックスの追加

    +
  • goto シンタックスの追加
  • +
      +
    • 通常の goto に加え、コードセグメントを呼び出す処理を追加。
    • +
    • コードセグメントへのgoto後は、 return の処理を自動で追加。
    • +
    +
    + +
    +

    +
  • +
    + +
    +

    +
  • +
    + +
    +

    +
  • +
    + +
    +

    環境付き継続とは

    +
  • コードセグメントを呼び出した C の関数に戻る機能
  • +
  • +
    + +
    +

    環境付き継続:クロージャでの実装について

    +
  • 『GCC 4.6 と Lion の組合せでは Closure は正しく動作していないことが分かった.』
    間違い
  • +
  • 訂正
  • +
      +
    • GCC 4.6 への CbC の実装のせいでクロージャがうまくできていなかったことが判明。
    • +
    • GCC 4.6 と Lion でのクロージャは特に問題はない。
    • +
    +
    + +
    +

    環境付き継続:クロージャでの実装の問題点

    +
  • +
  • +
    + +
    +

    環境付き継続: setjmp での実装

    +
  • setjmp での実装
  • + +
    +({
    +  int a = setjmp(env);
    +  int retval;
    +  void _cbc_internal_return(int retval_, jmp_buf _envp){
    +    retval = retval_;
    +    longjmp(_envp, retval);
    +  }
    +  if (a) {
    +    return retval;
    +  }
    +  _cbc_internal_return;
    +})
    +	
    +
    +
  • +
    + +
    +

    環境付き継続: setjmp での実装の問題

    +
  • GCC 内で setjmp を生成する関数を作る必要がある。
  • +
  • 戻値の型が int
  • +
      +
    • 構造体等ポインタの場合使えない。
    • +
    +
  • setjmp での実装はあまり実用的ではない。
  • +
    + +
    +

    +
  • +
    + +
    +

    +
  • +
    + +
    +

    +
  • +
    + +
    +

    +
  • +
    + +
    + + diff -r de1f203636d1 -r a967ee5a0b0f presen/index.html~ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/index.html~ Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,227 @@ + + + + + + +2011/12/20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    + +
    +

    Continuation based Cの GCC 4.6 上の実装について +

    +
  • 大城 信康
  • +

    琉球大学 並列信頼研究室

    +
    +
    + +
    +

    目的と背景(1)

    +
  • 当研究室ではコードセグメント単位で記述するプログラミング言語Continuation based C (以下CbC)という言語を開発している。
  • +
  • コードセグメントは並列実行の単位として使うことができ、プログラムの正しさを示す単位としても使用することができる。
  • +
    + +
    +

    目的と背景(2)

    +
  • CbC のコンパイラは2008年に GCC をベースとしたコンパイラが開発された。
  • +
  • GCC をベースとした CbC コンパイラは、GCC のアップデートに合わせ変更する必要がある。
  • +
  • 本研究ではGCC-4.5 をベースとしていた CbC コンパイラを GCC-4.6 へのアップデートを行い、Intel64 への対応するとともに CbC の拡張を行う。
  • +
    + +
    +

    今週の作業内容

    +
  • +
  • 環境付き継続について
  • +
      +
    • 変数 retval を static スレッドローカル(TLS)での実装
    • +
    +
    + +
    +

    static TLS のGeneric Tree

    +
  • 変数 retval の宣言(VAR_DECL)
  • +
  • static TLS の場合追加される情報は以下の2つ:(Linux)
  • +
      +
    • TLS のモデル: TLS_MODEL_LOCAL_EXEC
    • +
    • static フラグ 1
    • +
    +
  • 上記の設定で retval を作成しても正しい返り値は得られなかった。
  • +
    + +
    +

    環境付き継続の構文木をみる

    +
  • 環境継続において以下の retval 変数は static で作られている.
  • + +
    +({
    +  __label__ _cbc_exit0;
    +  static __thread int retval;
    +  void _cbc_internal_return(int retval_, void *_envp){
    +    printf("in _cbc_internal_return\n",retval_);
    +    retval = retval_;
    +    goto _cbc_exit0;
    +  }
    +  if (0) {
    +  _cbc_exit0:
    +    return retval;
    +  }
    +  _cbc_internal_return;
    +})
    +
    +
    +
    + +
    +

    環境付き継続の構文木をみる

    + +
  • BIND_EXPR は{ } の中身を束ねる。
  • +
  • STATEMENT_LIST が1つ1つのプログラムを表す木を持っている。
  • +
    + +
    +

    環境付き継続の構文木をみる

    + +
  • BIND_EXPR は _cbc_internal_return 関数を
    + ADDR_EXPR は最後の行の _cbc_internal_return を表す。
  • +
    + +
    +

    環境付き継続の構文木をみる

    +
  • _CbC_return の実装より作られる構文木を見てみる。
  • + + + +
    + +
    +

    環境付き継続の構文木をみる

    +
  • 出来上がる構文木が違う。
  • +
      +
    • DECL_EXPR が 1つ足りない +
    • BIND_EXPR の部分が COND_EXPR になっている。
    • +
    +
    + +
    +

    DECL_EXPR の問題

    +
  • なくなっている DECL_EXPR は VAR_DECL の部分。
  • +
  • static __thread int retval になる。
  • +
  • 下記の様にソースを変更
  • +
    +//      pushdecl (decl_cond);
    +add_stmt (build_stmt(location, DECL_EXPR,  pushdecl (decl_cond)));
    +	
    +
  • これで DECL_EXPR が追加された。
  • +
    + +
    +

    COND_EXPR の問題

    +
  • BIND_EXPR でなくて COND_EXPR になっていた問題。
  • +
  • BIND_EXPR をみると以下の様な構成になっていた。
  • + +
  • BIND_EXPR をなぜか COND_EXPR でもう一度包んでいた。
  • + +

    COND_EXPR には if(0){ } の中身が入る。

    +
    +
    + +
    +

    ソースの手直し

    +
  • if(0){ } の構文木が作られる手順を元に
    + cbc_finish_labeled_goto 関数を手直しした。 +
  • 同じ構文木が作られるようになった。
  • +
    + +
    +

    結果

    +
  • 正常な値が返ってくるようになった。
  • +
  • しかし、-O2 オプションをつけると返り値の取得が失敗した。
  • +
  • もっと細かく構文木をみて違いを見つける必要がある。
  • +
    + + +
    +

    今後の予定

    +
  • プロシン用プレゼンの用意
  • +
  • typedefrec, selftype の実装
  • +
  • CbC でタクスマネージャ作成
  • +
    + +
    + + diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/chillout.mp3 Binary file presen/mp3/chillout.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/club.mp3 Binary file presen/mp3/club.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/easy.mp3 Binary file presen/mp3/easy.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/electro.mp3 Binary file presen/mp3/electro.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/mini1.mp3 Binary file presen/mp3/mini1.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/mini2.mp3 Binary file presen/mp3/mini2.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/smart.mp3 Binary file presen/mp3/smart.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/mp3/thunder.mp3 Binary file presen/mp3/thunder.mp3 has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/obj/flash/relog.swf Binary file presen/obj/flash/relog.swf has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/obj/svg/sun.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/obj/svg/sun.svg Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + diff -r de1f203636d1 -r a967ee5a0b0f presen/pix/.DS_Store Binary file presen/pix/.DS_Store has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/pix/codesegment.png Binary file presen/pix/codesegment.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/pix/continuation.png Binary file presen/pix/continuation.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/pix/cs_prog.png Binary file presen/pix/cs_prog.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/pix/cs_stack.png Binary file presen/pix/cs_stack.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/pix/ir.png Binary file presen/pix/ir.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/audio_link.png Binary file presen/ui/advanced_gfx/audio_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/audio_on.png Binary file presen/ui/advanced_gfx/audio_on.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/audio_over.png Binary file presen/ui/advanced_gfx/audio_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/auto_link.png Binary file presen/ui/advanced_gfx/auto_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/auto_on.png Binary file presen/ui/advanced_gfx/auto_on.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/auto_over.png Binary file presen/ui/advanced_gfx/auto_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/backgrnd.png Binary file presen/ui/advanced_gfx/backgrnd.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/delay_link.png Binary file presen/ui/advanced_gfx/delay_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/exit_link.png Binary file presen/ui/advanced_gfx/exit_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/exit_over.png Binary file presen/ui/advanced_gfx/exit_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/fade_link.png Binary file presen/ui/advanced_gfx/fade_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/fade_on.png Binary file presen/ui/advanced_gfx/fade_on.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/fade_over.png Binary file presen/ui/advanced_gfx/fade_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/footer.jpg Binary file presen/ui/advanced_gfx/footer.jpg has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/framing.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/framing.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,22 @@ +/* The following styles size, place, and layer the slide components. + Edit these if you want to change the overall slide layout. + The commented lines can be uncommented (and modified, if necessary) + to help you with the rearrangement process. */ + +/* target = 1024x768 */ + +div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} +div#header {top: 0; height: 3em; z-index: 1;} +div#footer {top: auto; bottom: 0; height: 0.5em; z-index: 5;} +.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;} +div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} +div#controls form {text-align: right; width: 100%; margin: 0;} +#currentSlide {position: absolute; width: 12%; left: 44%; bottom: 1em; z-index: 10;} +html>body #currentSlide {position: fixed;} + +/* +div#header {background: #FCC;} +div#footer {background: #CCF;} +div#controls {background: #BBD;} +div#currentSlide {background: #FFC;} +*/ diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/header.png Binary file presen/ui/advanced_gfx/header.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/last_link.png Binary file presen/ui/advanced_gfx/last_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/last_over.png Binary file presen/ui/advanced_gfx/last_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/list_link.png Binary file presen/ui/advanced_gfx/list_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/loop_link.png Binary file presen/ui/advanced_gfx/loop_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/loop_on.png Binary file presen/ui/advanced_gfx/loop_on.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/loop_over.png Binary file presen/ui/advanced_gfx/loop_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/next_link.png Binary file presen/ui/advanced_gfx/next_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/next_over.png Binary file presen/ui/advanced_gfx/next_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/notes_link.png Binary file presen/ui/advanced_gfx/notes_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/notes_over.png Binary file presen/ui/advanced_gfx/notes_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/opera.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/opera.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,7 @@ +/* DO NOT CHANGE THESE unless you really want to break Opera Show */ +.slide { + visibility: visible !important; + position: static !important; + page-break-before: always; +} +#slide0 {page-break-before: avoid;} diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/outline.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/outline.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,14 @@ +/* don't change this unless you want the layout stuff to show up in the outline view! */ + +.hide, .layout div, #footer *, #controlForm * {display: none;} +#footer, #controls, #controlForm, #navLinks, #sheet {display: block; visibility: visible; margin: 0; padding: 0;} +#sheet {float: right; padding: 0.5em;} +html>body #sheet {position: fixed; top: 0; right: 0;} + + +/* making the outline look pretty-ish */ + +#slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;} +#slide0 h1 {padding-top: 1.5em;} +.slide h1 {margin: 1.5em 0 0; padding-top: 0.25em; border-top: 1px solid #888; border-bottom: 1px solid #AAA;} +#sheet {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;} diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/pause_link.png Binary file presen/ui/advanced_gfx/pause_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/pause_on.png Binary file presen/ui/advanced_gfx/pause_on.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/pause_over.png Binary file presen/ui/advanced_gfx/pause_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/pretty.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/pretty.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,142 @@ +/* Following are the presentation styles -- edit away! */ + +body {background: #FFF url(backgrnd.png) fixed; color: #333; font-family: Tahoma, Arial, Helvetica, sans-serif; font-size: 2.25em;} +a:link, a:visited {text-decoration: none; color: #C93;} + +h1, h2, h3, h4 {font-size: 100%; margin: 0; padding: 0; font-weight: inherit;} +h1 {text-shadow: 0.1em 0.1em 0.1em #333; background-color: transparent;} + +ul, pre {margin: 0; line-height: 1em;} +html, body {margin: 0; padding: 0;} + +blockquote, q {font-style: italic;} +blockquote {padding: 0 2em 0.5em; margin: 0 1.5em 0.5em; text-align: center; font-size: 1em;} +blockquote p {margin: 0;} +blockquote i {font-style: normal;} +blockquote b {display: block; margin-top: 0.5em; font-weight: normal; font-size: smaller; font-style: normal;} +blockquote b i {font-style: italic;} + +img {border: 0;} +kbd {font-weight: bold; font-size: 1em;} +sup {font-size: smaller; line-height: 1px;} + +.slide code {padding: 2px 0.25em; font-weight: bold; color: #533;} +.slide code.bad, code del {color: red;} +.slide code.old {color: silver;} +.slide pre {padding: 0; margin: 0.25em 0 0.5em 0.5em; color: #533; font-size: 90%;} +.slide pre code {display: block;} +.slide ul {margin-left: 5%; margin-right: 7%; list-style: disc;} +.slide li {margin-top: 0.75em; margin-right: 0;} +.slide ul ul {line-height: 1;} +.slide ul ul li {margin: .2em; font-size: 85%; list-style: square;} +.slide img.leader {display: block; margin: 0 auto;} + +div#header, div#footer {background: #fff; color: #AAA; font-family: Verdana, Arial, Helvetica, sans-serif;} +div#header {background: transparent url(header.png) bottom; line-height: 1px;} +div#footer {background: #999 url(footer.jpg) top; font-size: 0.5em; font-weight: bold; padding: 1em 0;} +#footer h1, #footer h2 {border: none; display: block; padding: 0; position:absolute; bottom:0.5em;} +#footer h1 {left:1em;} +#footer h2 {right:1em; font-style: italic;} + +div.long {font-size: 0.75em;} +.slide h1 {position: absolute; top: 0em; left: 1.25em; z-index: 1; margin: 0; padding: 0.35em 0 0 50px; white-space: nowrap; font: bold 150%/1em Verdana, Arial, Helvetica, sans-serif; text-transform: capitalize; color: #DDD; background-color: transparent;} +.slide h3 {font-size: 130%;} +h1 abbr {font-variant: small-caps;} + +div#controls {position: absolute; left: 0; bottom: 0; width: 100%; text-align: center; font: bold 1em Verdana, Arial, Helvetica, sans-serif;} +html>body div#controls {background: transparent; position: fixed; padding: 0; top: auto; text-align: center;} +#controls #sheet {display: none;} +#controls #controlForm {height: 32px; width: 100%; text-align: center; vertical-align: middle;} +#controls #navLinks {border-top: 1px solid #999; overflow: hidden; padding: 0; margin: 0; height: 32px; width: 100%; background-color: #808080; text-align: center; vertical-align: middle; white-space: nowrap;} +#controls #navLinks ul {margin: 0 auto; padding: 0; height: 32px; width: 500px; white-space: nowrap; text-align: center;} +#controls #navLinks ul li {list-style: none; display: inline; margin: 0; padding: 0; float: left; height: 32px; width: 32px; text-align: center; background-color: transparent;} +#controls #navLinks ul li.vr {list-style: none; display: inline; margin: 0px 2px; padding: 0; float: left; height: 32px; width: 1px; text-align: center; background-color: #606060;} +#controls #navLinks ul li a {margin: 0; padding: 0; float: left; height: 32px; width: 32px; background-color: transparent;} + +#controls #navLinks ul li#exit {background: url(exit_link.png) no-repeat top left;} +#controls #navLinks ul li#exit a:hover {background: url(exit_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#toggle {background: url(toggle_link.png) no-repeat top left;} +#controls #navLinks ul li#toggle a:hover {background: url(toggle_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#show-notes {background: url(notes_link.png) no-repeat top left;} +#controls #navLinks ul li#show-notes a:hover {background: url(notes_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#zero {background: url(zero_link.png) no-repeat top left;} +#controls #navLinks ul li#zero a:hover {background: url(zero_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#prev {background: url(prev_link.png) no-repeat top left;} +#controls #navLinks ul li#prev a:hover {background: url(prev_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#next {background: url(next_link.png) no-repeat top left;} +#controls #navLinks ul li#next a:hover {background: url(next_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#last {background: url(last_link.png) no-repeat top left;} +#controls #navLinks ul li#last a:hover {background: url(last_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#lst {background: url(list_link.png) no-repeat top left;} + +#controls #navLinks ul li#fade a.isoff {background: url(fade_link.png) no-repeat top left;} +#controls #navLinks ul li#fade a.ison {background: url(fade_on.png) no-repeat top right;} +#controls #navLinks ul li#fade a:hover {background: url(fade_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#audio {background: url(audio_link.png) no-repeat top left;} +#controls #navLinks ul li#audio a.isoff {background: url(audio_link.png) no-repeat top left;} +#controls #navLinks ul li#audio a.ison {background: url(audio_on.png) no-repeat top right;} +#controls #navLinks ul li#audio a:hover {background: url(audio_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#vol {background: url(volume_link.png) no-repeat top left;} + +#controls #navLinks ul li#auto a.isoff {background: url(auto_link.png) no-repeat top left;} +#controls #navLinks ul li#auto a.ison {background: url(auto_on.png) no-repeat top right;} +#controls #navLinks ul li#auto a:hover {background: url(auto_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#pause a.isoff {background: url(pause_link.png) no-repeat top left;} +#controls #navLinks ul li#pause a.ison {background: url(pause_on.png) no-repeat top right;} +#controls #navLinks ul li#pause a:hover {background: url(pause_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#loop a.isoff {background: url(loop_link.png) no-repeat top left;} +#controls #navLinks ul li#loop a.ison {background: url(loop_on.png) no-repeat top right;} +#controls #navLinks ul li#loop a:hover {background: url(loop_over.png) no-repeat bottom left;} + +#controls #navLinks ul li#del {background: url(delay_link.png) no-repeat top left;} + +#jumplist, #volumelist, #delaylist {padding: 0; margin: 0; width: 32px; height: 32px; cursor: n-resize;} + +#currentSlide {white-space: nowrap; text-align: center; margin-bottom: -0.5em; font-size: 0.5em; background-color: transparent; color: #999;} + +#guru {position: absolute; visibility: visible; left: 0px; top: 0px; padding: 4px; width: 99%; height: auto; text-align: center; background-color: black; z-index: 10;} +#guru div {border: solid 3px red; padding: 4px; font-family: monospace; font-size: 60%; width: auto; height: auto; color: red; text-align: center;} + +#slide0 {padding-top: 3.5em; font-size: 90%;} +#slide0 h1 {position: static; margin: 1em 0 0; padding: 0; font: bold 3em Verdana, Arial, Helvetica, sans-serif; font-variant: small-caps; text-shadow: 0.1em 0.1em 0.1em #666; white-space: normal; color: #222; background-color: transparent;} +#slide0 h2 {font: bold italic 1em Arial, Helvetica, sans-serif; margin: 0.25em;} +#slide0 h3 {margin-top: 1.5em; font-size: 1.5em;} +#slide0 h4 {margin-top: 0; font-size: 1em;} + +ul.urls {list-style: none; display: inline; margin: 0;} +.urls li {display: inline; margin: 0;} +.note {display: none;} +.external {border-bottom: 1px dotted gray;} +html>body .external {border-bottom: none;} +.external:after {content: " \274F"; font-size: smaller; color: #999;} + +.incremental, .incremental *, .incremental *:after {color: #ccc; visibility: visible;} +img.incremental, canvas.incremental {visibility: hidden;} +.slide .current {color: #B02;} + +/* diagnostics +li:after {content: " [" attr(class) "]"; color: #F88;} +*/ + +table.piechart, table.barchart, table.linechart { border-spacing: 0.3em 0.15em; } +table.piechart tr th, table.barchart tr th, table.linechart tr th { white-space: nowrap; } +table.piechart tr td, table.barchart tr td, table.linechart tr td { vertical-align: top; white-space: nowrap; } +table.piechart tr td.col, table.barchart tr td.col, table.linechart tr td.col { border-bottom: 1px solid #555; border-right: 1px solid #555; } +table.fs90 tr td, table.fs90 tr th, div.fs90, pre.fs90, p.fs90 ,ul.fs90 {font-size: 0.9em; } +table.fs75 tr td, table.fs75 tr th, div.fs75, pre.fs75, p.fs75 ,ul.fs75 {font-size: 0.75em; } +table.fs66 tr td, table.fs66 tr th, div.fs66, pre.fs66, p.fs66 ,ul.fs66 {font-size: 0.66em; } +table.fs50 tr td, table.fs50 tr th, div.fs50, pre.fs50, p.fs50 ,ul.fs50 {font-size: 0.5em; } + +#soundmanager-debug {position:fixed; top:0px; right:0px; width:30em; height:20em; overflow:auto; border:1px solid red; padding:1em; margin:2em; font-family:"sans serif"; font-size: 12px;color: black; background-color:#f6f6f6; z-index: 100;} +#soundmanager-debug code {font-size: 11px;} \ No newline at end of file diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/prev_link.png Binary file presen/ui/advanced_gfx/prev_link.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/prev_over.png Binary file presen/ui/advanced_gfx/prev_over.png has changed diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/print.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,3 @@ +/* The following rule is necessary to have all slides appear in print! DO NOT REMOVE IT! */ .slide, ul, p {page-break-inside: avoid; visibility: visible !important;} h1 {page-break-after: avoid;} +img {page-break-inside: avoid; page-break-after: avoid;} +/*.slide {page-break-after: always;}*/ body {font-size: 12pt; background: white;} * {color: black;} #slide0 h1 {font-size: 200%; border: none; margin: 0.5em 0 0.25em;} #slide0 h3 {margin: 0; padding: 0;} #slide0 h4 {margin: 0 0 0.5em; padding: 0;} #slide0 {margin-bottom: 3em;} h1 {border-top: 2pt solid gray; border-bottom: 1px dotted silver;} .extra {background: transparent !important;} div.extra, pre.extra, .example {font-size: 10pt; color: #333;} ul.extra a {font-weight: bold;} p.example {display: none;} #header {display: none;} #footer h1 {margin: 0; border-bottom: 1px solid; color: gray; font-style: italic;} #footer h2, #controls {display: none;} /* The following rule keeps the layout stuff out of print. Remove at your own risk! */ .hide, .layout, .layout * {display: none !important;} \ No newline at end of file diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/s5-core.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/s5-core.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,8 @@ +/* Do not edit or override these styles! The system will likely break if you do. */ + +div#header, div#footer, div#controls, .slide {position: absolute;} +html>body div#header, html>body div#footer, html>body div#controls, html>body .slide {position: fixed;} +.handout, .notes, .hide {display: none;} +.layout {display: block;} +.slide, .hideme, .incremental {visibility: hidden;} +#slide0 {visibility: visible;} diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/slides.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/slides.css Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,3 @@ +@import url(s5-core.css); /* required to make the slide show run at all */ +@import url(framing.css); /* sets basic placement and size of slide components */ +@import url(pretty.css); /* stuff that makes the slides look better than blah */ \ No newline at end of file diff -r de1f203636d1 -r a967ee5a0b0f presen/ui/advanced_gfx/slides.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/presen/ui/advanced_gfx/slides.js Sat Dec 24 18:53:34 2011 +0900 @@ -0,0 +1,2694 @@ +// S5 1.3beta7 (18-Apr-2007) advanced version by C. Effenberger +// Please see http://s5.netzgesta.de/ for more information +// based on S5 v1.2a1 slides.js -- released into the Public Domain +// Please see http://www.meyerweb.com/eric/tools/s5/credits.html for information +// about all the wonderful and talented contributors to this code! +// audio extension: soundmanager2 is NOT Public Domain +// Please see http://www.schillmania.com/projects/soundmanager2/ for information + +var undef; +var slideCSS = ''; +var snum = 0; +var smax = 1; +var incpos = 0; +var number = undef; +var firstTime = 1; +var s5mode = true; +var helpmode = false; +var defaultView = 'slideshow'; //outline +var controlVis = 'visible'; + +// scalable images extension +var empx = 0; +var images = new Array(); +var canvas = new Array(); +var medias = new Array(); +var piecharts = new Array(); +var barcharts = new Array(); +var linecharts = new Array(); +// scalable images extension + +// transition extension +var tranSitions = false; +var fadeModus = false; +var fadeDuration = 500; +var incrDuration = 250; +var opac = 1; +var cid = ''; +var nid = ''; +var tid = ''; +var jl = ''; +// transition extension + +// autoplay extension +var autoMatic = false; +var playLoop = false; +var playPause = false; +var autoRun = false; +var playDelay = 5000; +var remainDer = 0; +var incrDelay = 0; +// autoplay extension + +// audio extension +var sound = new Array(); +var audioSupport = false; +var audioVolume = 100; +var audioError = false; +var swfUnloaded = true; +var bgSoundItem = 9999; +var curSoundID = -1; +// audio extension + +// panel extension +var imgWidth = 32; +var imgHeight = 32; +// panel extension + +// canvas chart extension +var canvasSupport = false; +var ChartData = new Array(); +var colorSlice = new Array(); +var font = document.createElement("img"); +font.setAttribute("src", "ui/graphic_support/numeric.png"); +signs = { + '0': {sx: 0, sy: 0, sw: 48, sh: 64}, + '1': {sx: 48, sy: 0, sw: 48, sh: 64}, + '2': {sx: 96, sy: 0, sw: 48, sh: 64}, + '3': {sx: 144, sy: 0, sw: 48, sh: 64}, + '4': {sx: 192, sy: 0, sw: 48, sh: 64}, + '5': {sx: 240, sy: 0, sw: 48, sh: 64}, + '6': {sx: 288, sy: 0, sw: 48, sh: 64}, + '7': {sx: 336, sy: 0, sw: 48, sh: 64}, + '8': {sx: 384, sy: 0, sw: 48, sh: 64}, + '9': {sx: 432, sy: 0, sw: 48, sh: 64}, + '%': {sx: 480, sy: 0, sw: 48, sh: 64}, + '.': {sx: 528, sy: 0, sw: 24, sh: 64} +}; +var colorNames= new Array(); +colorNames["black"]="#000000"; colorNames["maroon"]="#800000"; colorNames["green"]="#008000"; colorNames["olive"]="#808000"; colorNames["navy"]="#000080"; colorNames["purple"]="#800080"; colorNames["teal"]="#008080"; colorNames["gray"]="#808080"; colorNames["silver"]="#C0C0C0"; colorNames["red"]="#FF0000"; colorNames["lime"]="#00FF00"; colorNames["yellow"]="#FFFF00"; colorNames["blue"]="#0000FF"; colorNames["fuchsia"]="#FF00FF"; colorNames["aqua"]="#00FFFF"; colorNames["white"]="#FFFFFF"; colorNames["aliceblue"]="#F0F8FF"; colorNames["antiquewhite"]="#FAEBD7"; colorNames["aquamarine"]="#7FFFD4"; colorNames["azure"]="#F0FFFF"; colorNames["beige"]="#F5F5DC"; colorNames["blueviolet"]="#8A2BE2"; colorNames["brown"]="#A52A2A"; colorNames["burlywood"]="#DEB887"; colorNames["cadetblue"]="#5F9EA0"; colorNames["chartreuse"]="#7FFF00"; colorNames["chocolate"]="#D2691E"; colorNames["coral"]="#FF7F50"; colorNames["cornflowerblue"]="#6495ED"; colorNames["cornsilk"]="#FFF8DC"; colorNames["crimson"]="#DC143C"; colorNames["darkblue"]="#00008B"; colorNames["darkcyan"]="#008B8B"; colorNames["darkgoldenrod"]="#B8860B"; colorNames["darkgray"]="#A9A9A9"; colorNames["darkgreen"]="#006400"; colorNames["darkkhaki"]="#BDB76B"; colorNames["darkmagenta"]="#8B008B"; colorNames["darkolivegreen"]="#556B2F"; colorNames["darkorange"]="#FF8C00"; colorNames["darkorchid"]="#9932CC"; colorNames["darkred"]="#8B0000"; colorNames["darksalmon"]="#E9967A"; colorNames["darkseagreen"]="#8FBC8F"; colorNames["darkslateblue"]="#483D8B"; colorNames["darkslategray"]="#2F4F4F"; colorNames["darkturquoise"]="#00CED1"; colorNames["darkviolet"]="#9400D3"; colorNames["deeppink"]="#FF1493"; colorNames["deepskyblue"]="#00BFFF"; colorNames["dimgray"]="#696969"; colorNames["dodgerblue"]="#1E90FF"; colorNames["firebrick"]="#B22222"; colorNames["floralwhite"]="#FFFAF0"; colorNames["forestgreen"]="#228B22"; colorNames["gainsboro"]="#DCDCDC"; colorNames["ghostwhite"]="#F8F8FF"; colorNames["gold"]="#FFD700"; colorNames["goldenrod"]="#DAA520"; colorNames["greenyellow"]="#ADFF2F"; colorNames["honeydew"]="#F0FFF0"; colorNames["hotpink"]="#FF69B4"; colorNames["indianred"]="#CD5C5C"; colorNames["indigo"]="#4B0082"; colorNames["ivory"]="#FFFFF0"; colorNames["khaki"]="#F0E68C"; colorNames["lavender"]="#E6E6FA"; colorNames["lavenderblush"]="#FFF0F5"; colorNames["lawngreen"]="#7CFC00"; colorNames["lemonchiffon"]="#FFFACD"; colorNames["lightblue"]="#ADD8E6"; colorNames["lightcoral"]="#F08080"; colorNames["lightcyan"]="#E0FFFF"; colorNames["lightgoldenrodyellow"]="#FAFAD2"; colorNames["lightgreen"]="#90EE90"; colorNames["lightgrey"]="#D3D3D3"; colorNames["lightpink"]="#FFB6C1"; colorNames["lightsalmon"]="#FFA07A"; colorNames["lightseagreen"]="#20B2AA"; colorNames["lightskyblue"]="#87CEFA"; colorNames["lightslategray"]="#778899"; colorNames["lightsteelblue"]="#B0C4DE"; colorNames["lightyellow"]="#FFFFE0"; colorNames["limegreen"]="#32CD32"; colorNames["linen"]="#FAF0E6"; colorNames["mediumaquamarine"]="#66CDAA"; colorNames["mediumblue"]="#0000CD"; colorNames["mediumorchid"]="#BA55D3"; colorNames["ediumpurple"]="#9370D"; colorNames["mediumseagreen"]="#3CB371"; colorNames["mediumslateblue"]="#7B68EE"; colorNames["mediumspringgreen"]="#00FA9A"; colorNames["mediumturquoise"]="#48D1CC"; colorNames["mediumvioletred"]="#C71585"; colorNames["midnightblue"]="#191970"; colorNames["mintcream"]="#F5FFFA"; colorNames["mistyrose"]="#FFE4E1"; colorNames["moccasin"]="#FFE4B5"; colorNames["navajowhite"]="#FFDEAD"; colorNames["oldlace"]="#FDF5E6"; colorNames["olivedrab"]="#6B8E23"; colorNames["orange"]="#FFA500"; colorNames["orangered"]="#FF4500"; colorNames["orchid"]="#DA70D6"; colorNames["palegoldenrod"]="#EEE8AA"; colorNames["palegreen"]="#98FB98"; colorNames["paleturquoise"]="#AFEEEE"; colorNames["palevioletred"]="#DB7093"; colorNames["papayawhip"]="#FFEFD5"; colorNames["peachpuff"]="#FFDAB9"; colorNames["peru"]="#CD853F"; colorNames["pink"]="#FFC0CB"; colorNames["plum"]="#DDA0DD"; colorNames["powderblue"]="#B0E0E6"; colorNames["rosybrown"]="#BC8F8F"; colorNames["royalblue"]="#4169E1"; colorNames["saddlebrown"]="#8B4513"; colorNames["salmon"]="#FA8072"; colorNames["sandybrown"]="#F4A460"; colorNames["seagreen"]="#2E8B57"; colorNames["seashell"]="#FFF5EE"; colorNames["sienna"]="#A0522D"; colorNames["skyblue"]="#87CEEB"; colorNames["slateblue"]="#6A5ACD"; colorNames["slategray"]="#708090"; colorNames["snow"]="#FFFAFA"; colorNames["springgreen"]="#00FF7F"; colorNames["steelblue"]="#4682B4"; colorNames["tan"]="#D2B48C"; colorNames["thistle"]="#D8BFD8"; colorNames["tomato"]="#FF6347"; colorNames["turquoise"]="#40E0D0"; colorNames["violet"]="#EE82EE"; colorNames["wheat"]="#F5DEB3"; colorNames["whitesmoke"]="#F5F5F5"; colorNames["yellowgreen"]="#9ACD32"; +var canvas_bgcolor = ""; +var canvas_width = 200; +var canvas_height = 200; +var canvas_noshade = 0; +var canvas_nofill = 0; +var canvas_noshadow = 0; +var canvas_htmltext = 0; +var canvas_imgtext = 0; +var canvas_notext = 0; +// canvas chart extension + +var s5NotesWindow; +var s5NotesWindowLoaded = false; +var previousSlide = 0; +var presentationStart = new Date(); +var slideStart = new Date(); + +var countdown = { + timer: 0, + state: 'pause', + start: new Date(), + end: 0, + remaining: 0 +}; + +var isIE = navigator.appName == 'Microsoft Internet Explorer' && navigator.userAgent.indexOf('Opera') < 1 ? 1 : 0; +if(isIE) var notIE7 = parseInt(navigator.appVersion) < 7 ? 1 : 0; +var isOp = navigator.userAgent.indexOf('Opera') > -1 ? 1 : 0; +var isGe = navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('Safari') < 1 ? 1 : 0; +var isS2 = navigator.userAgent.indexOf('Safari') >= 2 ? 1 : 0; + +function hasClass(object, className) { + if (!object.className) return false; + return (object.className.search('(^|\\s)' + className + '(\\s|$)') != -1); +} + +function hasValue(object, value) { + if (!object) return false; + return (object.search('(^|\\s)' + value + '(\\s|$)') != -1); +} + +function removeClass(object,className) { + if (!object || !hasClass(object,className)) return; + object.className = object.className.replace(new RegExp('(^|\\s)'+className+'(\\s|$)'), RegExp.$1+RegExp.$2); +} + +function addClass(object,className) { + if (!object || hasClass(object, className)) return; + if (object.className) { + object.className += ' '+className; + } else { + object.className = className; + } +} + +function changeClass(object,className) { + if (!object) return; + object.firstChild.className = className; +} + +function GetElementsWithClassName(elementName,className) { + var allElements = document.getElementsByTagName(elementName); + var elemColl = new Array(); + for (var i = 0; i< allElements.length; i++) { + if (hasClass(allElements[i], className)) { + elemColl[elemColl.length] = allElements[i]; + } + } + return elemColl; +} + +function isParentOrSelf(element, id) { + if (element == null || element.nodeName=='BODY') return false; + else if (element.id == id) return true; + else return isParentOrSelf(element.parentNode, id); +} + +function nodeValue(node) { + var result = ""; + if (node.nodeType == 1) { + var children = node.childNodes; + for (var i = 0; i < children.length; ++i) { + result += nodeValue(children[i]); + } + } + else if (node.nodeType == 3) { + result = node.nodeValue; + } + return(result); +} + +function slideLabel() { + var slideColl = GetElementsWithClassName('*','slide'); + var list = document.getElementById('jumplist'); + smax = slideColl.length; + for (var n = 0; n < smax; n++) { + var obj = slideColl[n]; + var did = 'slide' + n.toString(); + obj.setAttribute('id',did); + var otext = ''; + var menu = obj.firstChild; + if (!menu) continue; // to cope with empty slides + while (menu && menu.nodeType == 3) { + menu = menu.nextSibling; + } + if (!menu) continue; // to cope with slides with only text nodes + var menunodes = menu.childNodes; + for (var o = 0; o < menunodes.length; o++) { + otext += nodeValue(menunodes[o]); + } + list.options[list.length] = new Option(n + ' : ' + otext, n); + } +} + +function currentSlide() { + var cs, at, fd, ss; + if (document.getElementById) { + cs = document.getElementById('currentSlide'); + } else { + cs = document.currentSlide; + } + fd = fadeModus?"F":"–"; + ss = audioSupport?"S":"–"; + at = (autoMatic?(playPause?"||":(playLoop?">0":">|")):"––"); + cs.innerHTML = '