libutap
|
#include <cmath>
#include <cstdio>
#include <cassert>
#include <list>
#include <stdexcept>
#include <boost/tuple/tuple.hpp>
#include "utap/utap.h"
#include "utap/typechecker.h"
#include "utap/systembuilder.h"
Functions | |
static bool | isCost (expression_t expr) |
static bool | isVoid (expression_t expr) |
static bool | isDouble (expression_t expr) |
static bool | isInteger (expression_t expr) |
static bool | isBound (expression_t expr) |
static bool | isIntegral (expression_t expr) |
static bool | isClock (expression_t expr) |
static bool | isDiff (expression_t expr) |
static bool | isDoubleValue (expression_t expr) |
static bool | isNumber (expression_t expr) |
static bool | isConstantInteger (expression_t expr) |
static bool | isConstantDouble (expression_t expr) |
static bool | isInvariant (expression_t expr) |
static bool | isGuard (expression_t expr) |
static bool | isConstraint (expression_t expr) |
static bool | isFormula (expression_t expr) |
static bool | isListOfFormulas (expression_t expr) |
static bool | hasStrictLowerBound (expression_t expr) |
static bool | hasStrictUpperBound (expression_t expr) |
static bool | isInvariantWR (expression_t expr) |
Returns true iff type is a valid invariant. More... | |
static bool | isAssignable (type_t type) |
Returns true if values of this type can be assigned. More... | |
static bool | isGameProperty (expression_t expr) |
static bool | hasMITLInQuantifiedSub (expression_t expr) |
static bool | hasSpawnOrExit (expression_t expr) |
static bool | validReturnType (type_t type) |
static int | channelCapability (type_t type) |
Returns a value indicating the capabilities of a channel. More... | |
static bool | isSameScalarType (type_t t1, type_t t2) |
Returns true if two scalar types are name-equivalent. More... | |
static bool | isProcessID (expression_t expr) |
static bool | checkIDList (expression_t expr, kind_t kind) |
bool | parseXTA (FILE *file, TimedAutomataSystem *system, bool newxta) |
bool | parseXTA (const char *buffer, TimedAutomataSystem *system, bool newxta) |
int32_t | parseXMLBuffer (const char *buffer, TimedAutomataSystem *system, bool newxta) |
int32_t | parseXMLFile (const char *file, TimedAutomataSystem *system, bool newxta) |
expression_t | parseExpression (const char *str, TimedAutomataSystem *system, bool newxtr) |
|
static |
Returns a value indicating the capabilities of a channel.
For urgent channels this is 0, for non-urgent broadcast channels this is 1, and in all other cases 2. An argument to a channel parameter must have at least the same capability as the parameter.
References UTAP::Constants::BROADCAST, UTAP::type_t::is(), UTAP::type_t::isChannel(), and URGENT.
|
static |
References UTAP::expression_t::getKind(), UTAP::expression_t::getSize(), isProcessID(), and UTAP::Constants::LIST.
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
|
static |
|
static |
References UTAP::expression_t::getKind(), UTAP::expression_t::getSize(), UTAP::Constants::GT, isClock(), isIntegral(), and UTAP::Constants::LT.
Referenced by UTAP::TypeChecker::visitEdge().
|
static |
References UTAP::expression_t::getKind(), UTAP::expression_t::getSize(), UTAP::Constants::GT, isClock(), isIntegral(), and UTAP::Constants::LT.
Referenced by UTAP::TypeChecker::visitEdge().
|
static |
Returns true if values of this type can be assigned.
This is the case for integers, booleans, clocks, cost, scalars and arrays and records of these. E.g. channels and processes are not assignable.
References UTAP::Constants::ARRAY, UTAP::Constants::BOOL, UTAP::Constants::CLOCK, UTAP::Constants::COST, UTAP::Constants::DOUBLE, UTAP::type_t::getKind(), UTAP::Constants::INT, UTAP::Constants::RECORD, UTAP::Constants::SCALAR, and UTAP::type_t::size().
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
References UTAP::expression_t::getType(), UTAP::type_t::isDouble(), and UTAP::type_t::isInteger().
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
|
static |
References UTAP::Constants::CONSTANT, UTAP::expression_t::getKind(), and isDouble().
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
References UTAP::Constants::CONSTANT, UTAP::expression_t::getKind(), and isInteger().
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
|
static |
References UTAP::Constants::COST, UTAP::expression_t::getType(), and UTAP::type_t::is().
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isDiff().
Referenced by UTAP::TypeChecker::checkExpression(), and isDoubleValue().
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isDouble().
Referenced by isConstantDouble(), and isDoubleValue().
|
static |
References isClock(), isDiff(), and isDouble().
Referenced by UTAP::TypeChecker::checkExpression(), and isNumber().
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isFormula().
Referenced by UTAP::TypeChecker::checkExpression(), and UTAP::TypeChecker::visitProperty().
|
static |
References UTAP::Constants::CONSISTENCY, UTAP::Constants::CONTROL, UTAP::Constants::CONTROL_TOPT, UTAP::Constants::CONTROL_TOPT_DEF1, UTAP::Constants::CONTROL_TOPT_DEF2, UTAP::Constants::EF_CONTROL, UTAP::expression_t::getKind(), UTAP::Constants::IMPLEMENTATION, UTAP::Constants::PO_CONTROL, UTAP::Constants::REFINEMENT_GE, UTAP::Constants::REFINEMENT_LE, UTAP::Constants::SIMULATION_GE, UTAP::Constants::SIMULATION_LE, UTAP::Constants::SMC_CONTROL, and UTAP::Constants::SPECIFICATION.
Referenced by UTAP::TypeChecker::visitProperty().
|
static |
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isInteger().
Referenced by UTAP::TypeChecker::checkExpression(), isConstantInteger(), and UTAP::TypeChecker::visitIODecl().
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isIntegral().
Referenced by UTAP::TypeChecker::checkExpression(), hasStrictLowerBound(), hasStrictUpperBound(), UTAP::type_t::isInvariant(), isNumber(), UTAP::TypeChecker::visitEdge(), UTAP::TypeChecker::visitGanttChart(), UTAP::TypeChecker::visitProgressMeasure(), and UTAP::TypeChecker::visitState().
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isInvariant().
Referenced by UTAP::TypeChecker::checkExpression(), UTAP::type_t::isGuard(), and isInvariantWR().
|
static |
Returns true iff type is a valid invariant.
A valid invariant is either an invariant expression or an integer expression.
References UTAP::expression_t::getType(), UTAP::Constants::INVARIANT_WR, UTAP::type_t::is(), and isInvariant().
Referenced by UTAP::TypeChecker::checkExpression(), and UTAP::TypeChecker::visitState().
|
static |
References UTAP::expression_t::getKind(), UTAP::expression_t::getSize(), and UTAP::Constants::LIST.
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
References isDoubleValue(), and isIntegral().
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
References UTAP::expression_t::getKind(), UTAP::expression_t::getType(), UTAP::Constants::IDENTIFIER, UTAP::type_t::is(), and UTAP::Constants::PROCESS.
Referenced by UTAP::TypeChecker::checkExpression(), and checkIDList().
Returns true if two scalar types are name-equivalent.
References UTAP::Constants::CONSTANT, UTAP::Constants::EF, UTAP::type_t::getKind(), UTAP::type_t::getLabel(), UTAP::type_t::getRange(), UTAP::Constants::LABEL, UTAP::Constants::RANGE, UTAP::Constants::REF, UTAP::Constants::SCALAR, and UTAP::Constants::SYSTEM_META.
Referenced by UTAP::TypeChecker::checkExpression().
|
static |
References UTAP::expression_t::getType(), and UTAP::type_t::isVoid().
Referenced by UTAP::TypeChecker::checkExpression().
expression_t parseExpression | ( | const char * | str, |
TimedAutomataSystem * | system, | ||
bool | newxtr | ||
) |
int32_t parseXMLBuffer | ( | const char * | buffer, |
TimedAutomataSystem * | system, | ||
bool | newxta | ||
) |
References UTAP::TimedAutomataSystem::accept(), UTAP::TimedAutomataSystem::hasErrors(), and parseXMLBuffer().
Referenced by parseXMLBuffer().
int32_t parseXMLFile | ( | const char * | file, |
TimedAutomataSystem * | system, | ||
bool | newxta | ||
) |
References UTAP::TimedAutomataSystem::accept(), UTAP::TimedAutomataSystem::hasErrors(), and parseXMLFile().
Referenced by main(), and parseXMLFile().
bool parseXTA | ( | FILE * | file, |
TimedAutomataSystem * | system, | ||
bool | newxta | ||
) |
References UTAP::TimedAutomataSystem::accept(), UTAP::TimedAutomataSystem::hasErrors(), and parseXTA().
Referenced by parseExpression(), and parseXTA().
bool parseXTA | ( | const char * | buffer, |
TimedAutomataSystem * | system, | ||
bool | newxta | ||
) |
|
static |