Stop installing librairies during tests
[parser.git] / verigraph / service / src / mcnet / netobjs / DumbNode.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.netobjs;
11
12 import com.microsoft.z3.Context;
13 import com.microsoft.z3.DatatypeExpr;
14 import com.microsoft.z3.Solver;
15
16 import mcnet.components.NetworkObject;
17
18 /**
19  * This is just a wrapper around z3 instances. The idea is that by using this we perhaps need to have
20  * fewer (or no) ifs to deal with the case where we don't instantiate an object for a node
21  *
22  */
23 public class DumbNode extends NetworkObject {
24         public DumbNode(Context ctx, Object[]... args){
25                 super(ctx,args);
26         }
27
28         @Override
29         protected void addConstraints(Solver solver) {
30                 return;
31         }
32
33         @Override
34         protected void init(Context ctx, Object[]... args) {
35                 isEndHost=true;
36                 this.z3Node = (DatatypeExpr)args[0][0];
37         }
38         @Override
39         public DatatypeExpr getZ3Node() {
40                 return z3Node;
41         }
42 }