Skip to content
Snippets Groups Projects
Select Git revision
  • 4b82664d1a08030cb8601837b04fbc2757c2c28d
  • master default protected
  • dev
  • sybilNLO
  • gprBug
  • maximumtotalflux
  • easyConstraint
  • switchbug
  • thuong
  • momafix
  • rmReactBug
11 results

sysBiolAlgClass.R

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    RecursiveFunktion.java 1.31 KiB
    package de.tla2b.analysis;
    
    import de.tla2b.exceptions.NotImplementedException;
    import tla2sany.semantic.OpApplNode;
    import tla2sany.semantic.OpDefNode;
    import tlc2.tool.BuiltInOPs;
    
    public class RecursiveFunktion extends BuiltInOPs {
    
    	private OpDefNode def;
    	private OpApplNode rfs;
    	private OpApplNode ifThenElse;
    
    	public RecursiveFunktion(OpDefNode n, OpApplNode rfs)
    			throws NotImplementedException {
    		def = n;
    		this.rfs = rfs;
    		//evalDef();
    	}
    
    
    //	/**
    //	 * @throws NotImplementedException
    //	 * 
    //	 */
    //	private void evalDef() throws NotImplementedException {
    //		ExprOrOpArgNode e = rfs.getArgs()[0];
    //		//System.out.println(rfs.toString(5));
    //		if (e instanceof OpApplNode) {
    //			OpApplNode o = (OpApplNode) e;
    //			switch (getOpCode(o.getOperator().getName())) {
    //			case OPCODE_ite: { // IF THEN ELSE
    //				ifThenElse = o;
    //				return;
    //			}
    //			}
    //			throw new NotImplementedException(
    //					"Only IF/THEN/ELSE or CASE constructs are supported at the body of a recursive function.");
    //		} else {
    //			throw new NotImplementedException(
    //					"Only IF/THEN/ELSE or CASE constructs are supported at the body of a recursive function.");
    //		}
    //	}
    
    	public OpDefNode getOpDefNode() {
    		return def;
    	}
    
    	public OpApplNode getRF() {
    		return rfs;
    	}
    
    	public OpApplNode getIfThenElse() {
    		return ifThenElse;
    	}
    }