All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unive.lisa.analysis.combination.ValueCartesianProduct Maven / Gradle / Ivy

The newest version!
package it.unive.lisa.analysis.combination;

import it.unive.lisa.analysis.value.ValueDomain;
import it.unive.lisa.symbolic.value.Identifier;
import it.unive.lisa.symbolic.value.ValueExpression;

/**
 * A Cartesian product between two non-communicating {@link ValueDomain}s (i.e.,
 * no exchange of information between the abstract domains) assigning
 * {@link Identifier}s and handling {@link ValueExpression}s.
 * 
 * @author Vincenzo Arceri
 *
 * @param  the concrete instance of the left-hand side value abstract domain
 *                 of the Cartesian product
 * @param  the concrete instance of the right-hand side value abstract
 *                 domain of the Cartesian product
 */
public class ValueCartesianProduct, T2 extends ValueDomain>
		extends
		CartesianProduct, T1, T2, ValueExpression, Identifier>
		implements
		ValueDomain> {

	/**
	 * Builds the value Cartesian product.
	 * 
	 * @param left  the left-hand side of the value Cartesian product
	 * @param right the right-hand side of the value Cartesian product
	 */
	public ValueCartesianProduct(
			T1 left,
			T2 right) {
		super(left, right);
	}

	@Override
	public ValueCartesianProduct mk(
			T1 left,
			T2 right) {
		return new ValueCartesianProduct<>(left, right);
	}

	@Override
	public boolean isBottom() {
		return left.isBottom() && right.isBottom();
	}

	@Override
	public boolean knowsIdentifier(
			Identifier id) {
		return left.knowsIdentifier(id) || right.knowsIdentifier(id);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy