|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.dependence.omega.omegaLib.Mapping
public final class Mapping
Mapping for relations.
$Id: Mapping.java,v 1.12 2007-01-04 16:46:02 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This version of the Omega Libray is a translation from C++ to Java of the Omega Library developed at the University of Maryland.
Copyright (C) 1994-1996 by the Omega ProjectWhen a relation operation needs to re-arrange the variables, it describes the re-arragement with a mapping, and then calls align to re-arrange them.All rights reserved.
NOTICE: This software is provided ``as is'', without any warranty, including any implied warranty for merchantability or fitness for a particular purpose. Under no circumstances shall the Omega Project or its agents be liable for any use of, misuse of, or inability to use this software, including incidental and consequential damages.
License is hereby given to use, modify, and redistribute this software, in whole or in part, for any purpose, commercial or non-commercial, provided that the user agrees to the terms of this copyright notice, including disclaimer of warranty, and provided that this copyright notice, including disclaimer of warranty, is preserved in the source code and documentation of anything derived from this software. Any redistributor of this software or anything derived from this software assumes responsibility for ensuring that any parties to whom such a redistribution is made are fully aware of the terms of this license and disclaimer.
The Omega project can be contacted at omega@cs.umd.edu or http://www.cs.umd.edu/projects/omega
In a mapping, map_in (map_out/map_set) gives the new type and position of each of the old input (output/set) variables. For variables being mapped to Input, Output, or Set variables, the position is the new position in the tuple. For variables being mapped to EXISTS_VAR, FORALL_VAR, or WILDCARD_VAR, the positions can be used to map multiple variables to the same quantified variable, by providing the same position. Each variable with a negative position is given a unique quantified variable that is NOT listed in the seen_exists_ids list. We are not sure what the positions mean for GLOBAL_VARs - perhaps they are ignored?
Currently, align supports only mapping to Set, Input, Output, and Exists vars.
Constructor Summary | |
---|---|
Mapping(int no_set)
|
|
Mapping(int n_input,
int n_output)
|
|
Mapping(Mapping m)
|
Method Summary | |
---|---|
int |
getInputFate(int prefix)
|
int |
getInReq()
|
int |
getMapInKind(int pos)
|
int |
getMapInPos(int pos)
|
int |
getMapOutKind(int pos)
|
int |
getMapOutPos(int pos)
|
int |
getOutputFate(int prefix)
|
int |
getOutReq()
|
void |
getRelationArityFromMappings(Mapping m2)
Scan mappings to see how many input and output variables they require. |
void |
getRelationArityFromOneMapping()
|
int |
getSetFate(int prefix)
|
int |
getTupleFate(int t,
int prefix)
If a tuple as a whole becomes the new Input or Output tuple, return the Tuple if they will become (Input, Output). |
boolean |
hasExistentials()
Determine if a mapping requires an f_exists node. |
static Mapping |
Identity(int setvars)
|
static Mapping |
Identity(int inp,
int outp)
|
int |
numberInput()
|
int |
numberOutput()
|
void |
setMap_in(int pos,
int type,
int map)
|
void |
setMap_out(int pos,
int type,
int map)
|
void |
setMap_set(int pos,
int type,
int map)
|
void |
setMap(int in_kind,
int pos,
int type,
int map)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mapping(int n_input, int n_output)
public Mapping(int no_set)
public Mapping(Mapping m)
Method Detail |
---|
public void setMap(int in_kind, int pos, int type, int map)
public void setMap_in(int pos, int type, int map)
public void setMap_set(int pos, int type, int map)
public void setMap_out(int pos, int type, int map)
public int getMapInKind(int pos)
public int getMapInPos(int pos)
public int getMapOutKind(int pos)
public int getMapOutPos(int pos)
public int numberInput()
public int numberOutput()
public int getTupleFate(int t, int prefix)
public int getSetFate(int prefix)
public int getInputFate(int prefix)
public int getOutputFate(int prefix)
public static Mapping Identity(int inp, int outp)
public static Mapping Identity(int setvars)
public boolean hasExistentials()
public void getRelationArityFromOneMapping()
public void getRelationArityFromMappings(Mapping m2)
public int getOutReq()
public int getInReq()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |