|
|
|
@ -30,6 +30,7 @@ import java.util.ArrayList; |
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Vector; |
|
|
|
import java.nio.file.Path; |
|
|
|
|
|
|
|
import param.BigRational; |
|
|
|
import parser.IdentUsage; |
|
|
|
@ -94,6 +95,9 @@ public class ModulesFile extends ASTElement implements ModelInfo, RewardGenerato |
|
|
|
// Actual values of (some or all) constants |
|
|
|
private Values constantValues; |
|
|
|
|
|
|
|
/** (Optional) The location (file) from which this ModulesFile was obtained */ |
|
|
|
private Path location; |
|
|
|
|
|
|
|
// Constructor |
|
|
|
|
|
|
|
public ModulesFile() |
|
|
|
@ -1560,6 +1564,26 @@ public class ModulesFile extends ASTElement implements ModelInfo, RewardGenerato |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
* Sets the path to the file underlying this ModulesFile, |
|
|
|
* or {@code null} to designate "unknown". |
|
|
|
*/ |
|
|
|
public void setLocation(Path location) |
|
|
|
{ |
|
|
|
// System.err.println("Model: " + location); |
|
|
|
this.location = location; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns the path to the file underlying this ModulesFile, if known. |
|
|
|
* Returns {@code null} otherwise. |
|
|
|
*/ |
|
|
|
public Path getLocation() |
|
|
|
{ |
|
|
|
return location; |
|
|
|
} |
|
|
|
|
|
|
|
// Methods required for ASTElement: |
|
|
|
|
|
|
|
/** |
|
|
|
@ -1699,6 +1723,9 @@ public class ModulesFile extends ASTElement implements ModelInfo, RewardGenerato |
|
|
|
ret.observableVars = (observableVars == null) ? null : new ArrayList<>(observableVars); |
|
|
|
ret.constantValues = (constantValues == null) ? null : new Values(constantValues); |
|
|
|
|
|
|
|
// a Path is immutable, no need for deep-copy |
|
|
|
ret.location = location; |
|
|
|
|
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|