Prolog Cafe v1.2

jp.ac.kobe_u.cs.prolog.lang
Class Arithmetic

java.lang.Object
  extended by jp.ac.kobe_u.cs.prolog.lang.Arithmetic

public class Arithmetic
extends java.lang.Object

The Arithmetic class contains a method for evaluating arithmetic expressions.
This class is mainly used by the builtin predicate is/2.


Constructor Summary
Arithmetic()
           
 
Method Summary
static NumberTerm evaluate(Term _t)
          Evaluates _t as an arithmetic expression, and returns the resulting number as NumberTerm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arithmetic

public Arithmetic()
Method Detail

evaluate

public static NumberTerm evaluate(Term _t)
                           throws PInstantiationException,
                                  IllegalDomainException
Evaluates _t as an arithmetic expression, and returns the resulting number as NumberTerm.

Throws:
PInstantiationException - if _t contains unbound variables.
IllegalDomainException - if _t is not an arithmetic expression.

Prolog Cafe v1.2

Copyright (C) 1997-2008 M.BANBARA and N.TAMURA