Skip to content
Snippets Groups Projects
Select Git revision
  • 83f33a7884421653084881c495e55ab39f05c865
  • master default protected
  • emoUS
  • add_default_vectorizer_and_pretrained_loading
  • clean_code
  • readme
  • issue127
  • generalized_action_dicts
  • ppo_num_dialogues
  • crossowoz_ddpt
  • issue_114
  • robust_masking_feature
  • scgpt_exp
  • e2e-soloist
  • convlab_exp
  • change_system_act_in_env
  • pre-training
  • nlg-scgpt
  • remapping_actions
  • soloist
20 results

soloist.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    TLC4B.java 13.77 KiB
    package de.tlc4b;
    
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStreamWriter;
    import java.io.UnsupportedEncodingException;
    
    import tlc2.TLCGlobals;
    import de.be4.classicalb.core.parser.exceptions.BException;
    import de.tlc4b.TLC4BGlobals;
    import de.tlc4b.analysis.UsedStandardModules.STANDARD_MODULES;
    import de.tlc4b.exceptions.TLC4BIOException;
    import de.tlc4b.exceptions.TLC4BException;
    import de.tlc4b.tlc.TLCOutputInfo;
    import de.tlc4b.tlc.TLCResults;
    import de.tlc4b.util.StopWatch;
    
    public class TLC4B {
    
    	private String filename;
    	private File mainfile;
    	private String machineFileNameWithoutFileExtension;
    	// e.g. Test of file foo/bar/Test.mch
    
    	private File buildDir;
    
    	private String tlaModule;
    	private String config;
    	private Translator translator;
    	private TLCOutputInfo tlcOutputInfo;
    	private String ltlFormula;
    	private String constantsSetup;
    
    	public static void main(String[] args) throws IOException {
    		System.setProperty("apple.awt.UIElement", "true"); // avoiding pop up
    															// windows
    		TLC4B tlc4b = new TLC4B();
    		try {
    			tlc4b.progress(args);
    		} catch (BException e) {
    			System.err.println("***** Parsing Error *****");
    			System.err.println(e.getMessage());
    			return;
    		} catch (TLC4BException e) {
    			System.err.println(e.getMessage());
    			System.out.println("Model checking time: 0 sec");
    			System.out.println("Result: " + e.getError());
    			return;
    		}
    
    		if (TLC4BGlobals.isRunTLC()) {
    			try {
    				TLCRunner.runTLC(tlc4b.machineFileNameWithoutFileExtension,
    						tlc4b.buildDir);
    				TLCResults results = new TLCResults(tlc4b.tlcOutputInfo);
    				results.evalResults();
    				tlc4b.printResults(results, TLC4BGlobals.isCreateTraceFile());
    				System.exit(0);
    
    			} catch (NoClassDefFoundError e) {
    				System.err
    						.println("Can not find TLC. The tlatools.jar must be included in the classpath.");
    			}
    
    		}