transform_reachable.tcl

Go to the documentation of this file.
00001 /*  -*- tcl -*- */
00002 /*  -- $Id: transform_reachable.tcl,v 1.1 2005/09/28 04:51:22 andreas_kupries Exp $ ---*/
00003 /* */
00004 /*  PAGE plugin - transform - reachable ~ Reachability Analysis*/
00005 /* */
00006 
00007 /*  ### ### ### ######### ######### #########*/
00008 /*  Imported API*/
00009 
00010 /*  -----------------+--*/
00011 /*  page_tdata       | Access to processed input stream.*/
00012 /*  -----------------+--*/
00013 /*  page_info        | Reporting to the user.*/
00014 /*  page_warning     |*/
00015 /*  page_error       |*/
00016 /*  -----------------+--*/
00017 /*  page_log_error   | Reporting of internals.*/
00018 /*  page_log_warning |*/
00019 /*  page_log_info    |*/
00020 /*  -----------------+--*/
00021 
00022 /*  ### ### ### ######### ######### #########*/
00023 /*  Exported API*/
00024 
00025 /*  -----------------+--*/
00026 /*  page_tfeature    | Query for special plugin features page might wish to use.*/
00027 /*  page_ttime       | Activate collection of timing statistics.*/
00028 /*  page_tgettime    | Return the collected timing statistics.*/
00029 /*  page_tlabel      | User readable label for the plugin.*/
00030 /*  page_thelp       | Doctools help text for plugin.*/
00031 /*  page_toptions    | Options understood by plugin.*/
00032 /*  page_tconfigure  | Option (re)configuration.*/
00033 /*  page_trun        | Transform input data per plugin configuration and hardwiring.*/
00034 /*  -----------------+--*/
00035 
00036 /*  ### ### ### ######### ######### #########*/
00037 /*  Requisites*/
00038 
00039 package require page::analysis::peg::reachable
00040 package require struct::tree         ; /*  Data structure.*/
00041 
00042 global usec
00043 global timed
00044     timed =  0
00045 
00046 /*  ### ### ### ######### ######### #########*/
00047 /*  Implementation of exported API*/
00048 
00049 ret  page_tlabel () {
00050     return Reachability
00051 }
00052 
00053 ret  page_tfeature (type key) {
00054     return [string eq $key timeable]
00055 }
00056 
00057 ret  page_ttime () {
00058     global timed
00059     set    timed 1
00060     return
00061 }
00062 
00063 ret  page_tgettime () {
00064     global  usec
00065     return $usec
00066 }
00067 
00068 ret  page_thelp () {
00069     return {}
00070 }
00071 
00072 ret  page_toptions () {
00073     return {}
00074 }
00075 
00076 ret  page_tconfigure (type option , type value) {
00077     return -code error "Cannot set value of unknown option \"$option\""
00078 }
00079 
00080 ret  page_trun (type data) {
00081     global timed usec
00082     page_log_info "transform/reachable/run/"
00083 
00084     if {$timed} {
00085     set usec [lindex [time {
00086         ::struct::tree          ::tree deserialize $data
00087         ::page::analysis::peg::reachable::remove! ::tree
00088     }] 0] ; #{}
00089     } else {
00090     ::struct::tree          ::tree deserialize $data
00091     ::page::analysis::peg::reachable::remove! ::tree
00092     }
00093 
00094     set data [::tree serialize]
00095     ::tree destroy
00096 
00097     page_log_info "transform/reachable/run/ok"
00098     return $data
00099 }
00100 
00101 /*  ### ### ### ######### ######### #########*/
00102 /*  Internal helper code.*/
00103 
00104 /*  ### ### ### ######### ######### #########*/
00105 /*  Initialization*/
00106 
00107 package provide page::transform::reachable 0.1
00108 

Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1