[BACK]Return to polymake.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / trans

Diff for /OpenXM/src/kan96xx/trans/polymake.sm1 between version 1.2 and 1.3

version 1.2, 2003/12/04 08:00:13 version 1.3, 2003/12/06 02:49:22
Line 1 
Line 1 
 % $OpenXM: OpenXM/src/kan96xx/trans/polymake.sm1,v 1.1 2003/12/04 07:49:24 takayama Exp $  % $OpenXM: OpenXM/src/kan96xx/trans/polymake.sm1,v 1.2 2003/12/04 08:00:13 takayama Exp $
 % It is a polymake interface  % It is a polymake interface
   
 /polymake.start {  /polymake.start {
   (ox.k0.loaded) boundp {  }    (ox.k0.loaded) boundp {  }
   { [(parse) (ox.sm1) pushfile] extension } ifelse    { [(parse) (ox.sm1) pushfile] extension
   oxk0.ccc [ ] eq {      /@@@polymake.k0.ccc [ ] def
      k0connectr oxk0.ccc oxsetmathcap oxk0.ccc oxmathcap    } ifelse
     @@@polymake.k0.ccc [ ] eq {
        k0connectr /@@@polymake.k0.ccc oxk0.ccc def /oxk0.ccc [ ] def
        @@@polymake.k0.ccc oxsetmathcap @@@polymake.k0.ccc oxmathcap
   } {  } ifelse    } {  } ifelse
   oxk0.ccc 0 get (closed) eq {    @@@polymake.k0.ccc 0 get (closed) eq {
      k0connectr oxk0.ccc oxsetmathcap oxk0.ccc oxmathcap       k0connectr /@@@polymake.k0.ccc oxk0.ccc def /oxk0.ccc [ ] def
        @@@polymake.k0.ccc oxsetmathcap @@@polymake.k0.ccc oxmathcap
   } {  } ifelse    } {  } ifelse
   [(which) (polymake)] oxshell tag 0 eq {    [(which) (polymake)] oxshell tag 0 eq {
      [(export) (PATH) (=) (/usr/local/polymake/bin:${PATH})] oxshell       [(export) (PATH) (=) (/usr/local/polymake/bin:${PATH})] oxshell
Line 29 
Line 33 
  ([action data_in_polymake_tfb_format] doPolymake )   ([action data_in_polymake_tfb_format] doPolymake )
  (         [result_in_tfb result_in_tree errors])   (         [result_in_tfb result_in_tree errors])
  (polymake, polymake2tfb, ox_k0 must be installed.)   (polymake, polymake2tfb, ox_k0 must be installed.)
    (cf. @@@polymake.k0.ccc )
  (Example:)   (Example:)
 % ( [(export) (PATH) (=) (/usr/local/polymake/bin:${PATH})] oxshell )  % ( [(export) (PATH) (=) (/usr/local/polymake/bin:${PATH})] oxshell )
  $ [(FACETS) (polymake.data(polymake.POINTS([[1,0,0],[1,1,0],[1,0,1],[1,1,1]])))]$   $ [(FACETS) (polymake.data(polymake.POINTS([[1,0,0],[1,1,0],[1,0,1],[1,1,1]])))]$
Line 46 
Line 51 
   
     /pError [ ] def      /pError [ ] def
 %% step 1:  polymake tfb ===> polymake native data  %% step 1:  polymake tfb ===> polymake native data
     oxk0.ccc ( polymake=Object; ) oxexecutestring      @@@polymake.k0.ccc ( polymake=Object; ) oxexecutestring
     oxk0.ccc ( QuoteMode(1); ) oxexecutestring      @@@polymake.k0.ccc ( QuoteMode(1); ) oxexecutestring
     oxk0.ccc [pData ( ;)] cat oxexecutestring      @@@polymake.k0.ccc [pData ( ;)] cat oxexecutestring
     oxk0.ccc oxpopcmo /ptree set      @@@polymake.k0.ccc oxpopcmo /ptree set
     oxk0.ccc ( QuoteMode(0); ) oxexecutestring      @@@polymake.k0.ccc ( QuoteMode(0); ) oxexecutestring
     [(treeToPolymake) ptree] extension /pNative set      [(treeToPolymake) ptree] extension /pNative set
 %% step 2: calling the polymake  %% step 2: calling the polymake
     [(polymake) (stringInOut://pNative.poly) pAction] addStdoutStderr      [(polymake) (stringInOut://pNative.poly) pAction] addStdoutStderr
Line 61 
Line 66 
      (2>) (stringOut://@@@stderr)] oxshell pop       (2>) (stringOut://@@@stderr)] oxshell pop
     pError [@@@stderr] append /pError set      pError [@@@stderr] append /pError set
 %% step 4: get also tree style data.  %% step 4: get also tree style data.
     oxk0.ccc ( polymake=Object; ) oxexecutestring      @@@polymake.k0.ccc ( polymake=Object; ) oxexecutestring
     oxk0.ccc ( QuoteMode(1); ) oxexecutestring      @@@polymake.k0.ccc ( QuoteMode(1); ) oxexecutestring
     oxk0.ccc [pResult ( ;)] cat oxexecutestring      @@@polymake.k0.ccc [pResult ( ;)] cat oxexecutestring
     oxk0.ccc oxpopcmo /ptree set      @@@polymake.k0.ccc oxpopcmo /ptree set
     oxk0.ccc ( QuoteMode(0); ) oxexecutestring      @@@polymake.k0.ccc ( QuoteMode(0); ) oxexecutestring
     [pResult ptree pError] /arg1 set      [pResult ptree pError] /arg1 set
     ] pop
     popVariables
     arg1
   } def
   
   [(tfbToTree)
   [(tfb-expression-in-string tfbToTree tree)
    (tfbToTree translates expressions in tfb/2 into tree form.)
    (Bug: the input is parsed by k0, so the symbol name given agrees with)
    (     a k0 symbol, it returns a strange answer.)
    $Example:  ( C+intpath.circle(0,1/2) ) tfbToTree :: $
   ]] putUsages
   
   /tfbToTree {
     /arg1 set
     [/in-tfbToTree  /pAction /pData /pNative /ptree
      /pResult  /pError /i
     ] pushVariables
     [
       arg1 /pData set
       polymake.start
   
       /pError [ ] def
   %%  tfb ===> CMO tree.
       @@@polymake.k0.ccc ( QuoteMode(1); ) oxexecutestring
       @@@polymake.k0.ccc [pData ( ;)] cat oxexecutestring
       @@@polymake.k0.ccc oxpopcmo /ptree set
       @@@polymake.k0.ccc ( QuoteMode(0); ) oxexecutestring
       /arg1 ptree def
   ] pop    ] pop
   popVariables    popVariables
   arg1    arg1

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>