// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/asg/LiteralFunction.java
// public class LiteralFunction implements Literal {
// 	@Nonnull
// 	public final Maybe<Variable> name;
// 	@Nonnull
// 	public final Maybe<Variable> arguments;
// 	@Nonnull
// 	public final ImmutableList<Variable> parameters;
// 	@Nonnull
// 	public final ImmutableList<Variable> locals;
// 
// 
// 	@Nonnull
// 	public final ImmutableList<Variable> captured;
// 	@Nonnull
// 	public final Block body;
// 	@Nonnull
// 	public final boolean isStrict;
// 
// 	public LiteralFunction(
// 		@Nonnull Maybe<Variable> name, @Nonnull Maybe<Variable> arguments, @Nonnull ImmutableList<Variable> parameters, @Nonnull ImmutableList<Variable> locals,
// 		@Nonnull ImmutableList<Variable> captured, @Nonnull Block body, boolean isStrict
// 	) {
// 		this.name = name;
// 		this.arguments = arguments;
// 		this.parameters = parameters;
// 		this.locals = locals;
// 		this.captured = captured;
// 		this.body = body;
// 		this.isStrict = isStrict;
// 	}
// 
// 	@Override
// 	public boolean equalsIgnoringChildren(@Nonnull Node node) {
// 		return node instanceof LiteralFunction &&
// 			this.name.equals(((LiteralFunction) node).name) &&
// 			this.arguments.equals(((LiteralFunction) node).arguments) &&
// 			this.parameters.equals(((LiteralFunction) node).parameters) &&
// 			this.locals.equals(((LiteralFunction) node).locals) &&
// 			this.captured.equals(((LiteralFunction) node).captured) &&
// 			this.isStrict == ((LiteralFunction) node).isStrict;
// 	}
// }
// 
// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/asg/Node.java
// public interface Node {
// 
// 	default boolean equalsIgnoringChildren(@Nonnull Node node) {
// 		return node.getClass() == this.getClass();
// 	}
// 
// }
// 
// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/visitor/EqualityChecker.java
// public final class EqualityChecker {
// 
// 	private EqualityChecker() {
// 
// 	}
// 
// 	public static boolean nodesAreEqual(@Nonnull Node node1, @Nonnull Node node2) {
// 		if (node1 == node2) {
// 			return true;
// 		}
// 		if (!node1.equalsIgnoringChildren(node2)) {
// 			return false;
// 		}
// 		ImmutableList<Node> nodeList1 = GetDescendents.getDescendants(node1);
// 		ImmutableList<Node> nodeList2 = GetDescendents.getDescendants(node2);
// 		if (nodeList1.length != nodeList2.length) {
// 			return false;
// 		}
// 		Iterator<Node> node1Iterator = nodeList1.iterator();
// 		Iterator<Node> node2Iterator = nodeList2.iterator();
// 		while (node1Iterator.hasNext() && node2Iterator.hasNext()) {
// 			if (!node1Iterator.next().equalsIgnoringChildren(node2Iterator.next())) {
// 				return false;
// 			}
// 		}
// 		return !node1Iterator.hasNext() && !node2Iterator.hasNext();
// 	}
// 
// }


import com.shapesecurity.functional.Pair;
import com.shapesecurity.functional.data.ImmutableList;
import com.shapesecurity.shift.es2017.scope.Scope;
import com.shapesecurity.shift.es2017.scope.ScopeLookup;
import com.shapesecurity.shift.es2017.scope.Variable;
import com.shapesecurity.shift.es2017.semantics.asg.LiteralFunction;
import com.shapesecurity.shift.es2017.semantics.asg.Node;
import com.shapesecurity.shift.es2017.semantics.visitor.EqualityChecker;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.IdentityHashMap;
import java.util.stream.Collectors;
/*
 * Copyright 2016 Shape Security, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.shapesecurity.shift.es2017.semantics;



public class Semantics {
	@Nonnull
	public final Node node;
	@Nonnull
	public final ImmutableList<Variable> locals;
	@Nonnull
	public final ImmutableList<String> scriptVarDecls;
	@Nonnull
	public final ScopeLookup scopeLookup;
	@Nonnull
	public final IdentityHashMap<LiteralFunction, Scope> functionScopes;

// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/asg/LiteralFunction.java
// public class LiteralFunction implements Literal {
// 	@Nonnull
// 	public final Maybe<Variable> name;
// 	@Nonnull
// 	public final Maybe<Variable> arguments;
// 	@Nonnull
// 	public final ImmutableList<Variable> parameters;
// 	@Nonnull
// 	public final ImmutableList<Variable> locals;
// 
// 
// 	@Nonnull
// 	public final ImmutableList<Variable> captured;
// 	@Nonnull
// 	public final Block body;
// 	@Nonnull
// 	public final boolean isStrict;
// 
// 	public LiteralFunction(
// 		@Nonnull Maybe<Variable> name, @Nonnull Maybe<Variable> arguments, @Nonnull ImmutableList<Variable> parameters, @Nonnull ImmutableList<Variable> locals,
// 		@Nonnull ImmutableList<Variable> captured, @Nonnull Block body, boolean isStrict
// 	) {
// 		this.name = name;
// 		this.arguments = arguments;
// 		this.parameters = parameters;
// 		this.locals = locals;
// 		this.captured = captured;
// 		this.body = body;
// 		this.isStrict = isStrict;
// 	}
// 
// 	@Override
// 	public boolean equalsIgnoringChildren(@Nonnull Node node) {
// 		return node instanceof LiteralFunction &&
// 			this.name.equals(((LiteralFunction) node).name) &&
// 			this.arguments.equals(((LiteralFunction) node).arguments) &&
// 			this.parameters.equals(((LiteralFunction) node).parameters) &&
// 			this.locals.equals(((LiteralFunction) node).locals) &&
// 			this.captured.equals(((LiteralFunction) node).captured) &&
// 			this.isStrict == ((LiteralFunction) node).isStrict;
// 	}
// }
// 
// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/asg/Node.java
// public interface Node {
// 
// 	default boolean equalsIgnoringChildren(@Nonnull Node node) {
// 		return node.getClass() == this.getClass();
// 	}
// 
// }
// 
// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/visitor/EqualityChecker.java
// public final class EqualityChecker {
// 
// 	private EqualityChecker() {
// 
// 	}
// 
// 	public static boolean nodesAreEqual(@Nonnull Node node1, @Nonnull Node node2) {
// 		if (node1 == node2) {
// 			return true;
// 		}
// 		if (!node1.equalsIgnoringChildren(node2)) {
// 			return false;
// 		}
// 		ImmutableList<Node> nodeList1 = GetDescendents.getDescendants(node1);
// 		ImmutableList<Node> nodeList2 = GetDescendents.getDescendants(node2);
// 		if (nodeList1.length != nodeList2.length) {
// 			return false;
// 		}
// 		Iterator<Node> node1Iterator = nodeList1.iterator();
// 		Iterator<Node> node2Iterator = nodeList2.iterator();
// 		while (node1Iterator.hasNext() && node2Iterator.hasNext()) {
// 			if (!node1Iterator.next().equalsIgnoringChildren(node2Iterator.next())) {
// 				return false;
// 			}
// 		}
// 		return !node1Iterator.hasNext() && !node2Iterator.hasNext();
// 	}
// 
// }


// Path: src/main/java/com/shapesecurity/shift/es2017/semantics/Semantics.java
import com.shapesecurity.functional.Pair;
import com.shapesecurity.functional.data.ImmutableList;
import com.shapesecurity.shift.es2017.scope.Scope;
import com.shapesecurity.shift.es2017.scope.ScopeLookup;
import com.shapesecurity.shift.es2017.scope.Variable;
import com.shapesecurity.shift.es2017.semantics.asg.LiteralFunction;
import com.shapesecurity.shift.es2017.semantics.asg.Node;
import com.shapesecurity.shift.es2017.semantics.visitor.EqualityChecker;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.IdentityHashMap;
import java.util.stream.Collectors;

/*
 * Copyright 2016 Shape Security, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.shapesecurity.shift.es2017.semantics;



public class Semantics {
	@Nonnull
	public final Node node;
	@Nonnull
	public final ImmutableList<Variable> locals;
	@Nonnull
	public final ImmutableList<String> scriptVarDecls;
	@Nonnull
	public final ScopeLookup scopeLookup;
	@Nonnull
	public final IdentityHashMap<LiteralFunction, Scope> functionScopes;

	public Semantics(@Nonnull Node node, @Nonnull ImmutableList<Variable> locals, @Nonnull ImmutableList<String> scriptVarDecls, @Nonnull ScopeLookup scopeLookup, @Nonnull IdentityHashMap<LiteralFunction, Scope> functionScopes) {