1 /*******************************************************************************
2 * Copyright (c) 2017 Politecnico di Torino and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Apache License, Version 2.0
6 * which accompanies this distribution, and is available at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *******************************************************************************/
9 package it.polito.verigraph.mcnet.components;
11 import com.microsoft.z3.Context;
12 import com.microsoft.z3.Solver;
14 /**Core component for everything that matters
18 public abstract class Core{
20 final int MAX_PORT = 512;
23 * Base class for all objects in the modeling framework
27 public Core(Context ctx, Object[]... args){ // Object[]... -> The nearest way to implement variable length argument lists
28 //in Java, in the most generic way.
32 * Override _init for any constructor initialization. Avoids having to explicitly call super.__init__ every Time.class
36 abstract protected void init(Context ctx,Object[]... args);
39 * Add constraints to solver
42 abstract protected void addConstraints(Solver solver);