Stop installing librairies during tests
[parser.git] / verigraph / service / src / mcnet / components / Core.java
1 /*******************************************************************************
2  * Copyright (c) 2017 Politecnico di Torino and others.
3  *
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
10 package mcnet.components;
11 import com.microsoft.z3.Context;
12 import com.microsoft.z3.Solver;
13
14 /**Core component for everything that matters
15  *
16  */
17 public abstract class Core{
18
19                 final int MAX_PORT = 512;
20
21            /**
22             * Base class for all objects in the modeling framework
23             * @param ctx
24             * @param args
25             */
26             public Core(Context ctx, Object[]... args){ // Object[]... -> The nearest way to implement variable length argument lists
27                                                                                                 //in Java, in the most generic way.
28                     init(ctx,args);
29             }
30             /**
31              * Override _init for any constructor initialization. Avoids having to explicitly call super.__init__ every Time.class
32              * @param ctx
33              * @param args
34              */
35             abstract protected void init(Context ctx,Object[]... args);
36
37             /**
38              * Add constraints to solver
39              * @param solver
40              */
41             abstract protected void addConstraints(Solver solver);
42 }
43
44