VariableMatchExpansion

gapt.formats.tip.transformation.VariableMatchExpansion

This class expands Boolean match-expressions whose matched expression is a variable.

Let E be the boolean match-expression ( match x ( case p_1 e_1) ... (case p_n e_n)), and let X_i be the variables in pattern p_i. Then the expression E is expanded into the formula !X_1 (e_1[x/p_1]) & ... & !X_n (e_n[x/p_n]).

The variable-match-expressions are expanded from outside to inside.

Value parameters

problem

A well-formed TIP problem whose variable-match expressions are to be expanded.

Attributes

Source
variableMatchExpansion.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

case object Exists extends Polarity

Attributes

Source
variableMatchExpansion.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Polarity
class Object
trait Matchable
class Any
Show all
Self type
Exists.type
case object Forall extends Polarity

Attributes

Source
variableMatchExpansion.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Polarity
class Object
trait Matchable
class Any
Show all
Self type
Forall.type
sealed trait Polarity

Attributes

Source
variableMatchExpansion.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Exists.type
object Forall.type

Value members

Concrete methods

Expands variable-match expressions in the given problem.

Expands variable-match expressions in the given problem.

Variable-match expressions are expanded in function definitions, goals and assertions.

Attributes

Returns

A problem without variable-match expressions.

Source
variableMatchExpansion.scala
def expandCaseStatement(variable: TipSmtIdentifier, tipSmtCase: TipSmtCase, polarity: Polarity): TipSmtExpression

Converts a case statement of a variable-match expression into a formula.

Converts a case statement of a variable-match expression into a formula.

Value parameters

tipSmtCase

The case statement to be expanded.

variable

The variable that is matched upon.

Attributes

Returns

A formula of the form !X (e[x/p]), where X are the variables occurring in the case-statement's pattern, e is the case statement's expression and p is the case statement's pattern.

Source
variableMatchExpansion.scala

Expands variable-match expressions in the given expression.

Expands variable-match expressions in the given expression.

Value parameters

expression

The expression whose variable-match expressions are to be expanded.

Attributes

Returns

An expression without variable-match subexpressions.

Source
variableMatchExpansion.scala

Expands variable-match expressions in the given expression.

Expands variable-match expressions in the given expression.

Value parameters

tipSmtMatch

The expression whose variable-match expressions are to be expanded.

Attributes

Returns

An expression without variable-match subexpressions.

Source
variableMatchExpansion.scala

Expands variable-match expressions in the given case-statement.

Expands variable-match expressions in the given case-statement.

Value parameters

tipSmtCase

The case statement in whose expression variable-match expressions are expanded.

Attributes

Returns

A case statement whose expression does not contain variable patterns.

Source
variableMatchExpansion.scala
def isVariable(identifier: TipSmtIdentifier): Boolean

Checks whether the given identifier represents a variable.

Checks whether the given identifier represents a variable.

Value parameters

identifier

The identifier to be checked.

Attributes

Returns

true if the given identifier is a variable, false otherwise.

Source
variableMatchExpansion.scala

Converts a pattern into an expression.

Converts a pattern into an expression.

Value parameters

pattern

The pattern to be converted into an expression.

Attributes

Returns

A formula representing the pattern.

Source
variableMatchExpansion.scala