Search in sources :

Example 1 with Absc

use of org.abs_models.Absc in project abstools by abstools.

the class Tester method compile.

private int compile(String[] args) throws DeltaModellingException, IOException, WrongProgramArgumentException, InternalBackendException {
    // initialize numberOfIterations, fixpointVersion
    List<String> upstreamArgs = this.parseArgs(args);
    Absc absc = Absc.parseArgs(upstreamArgs.toArray(new String[0]));
    this.arguments = absc;
    final Model model = this.parse(arguments.files);
    if (model.hasParserErrors() || model.hasErrors() || model.hasTypeErrors()) {
        return 127;
    }
    if (arguments.verbose) {
        System.out.println("Starting deadlock analysis...");
    }
    /*Instantiate the analyzer and perform deadlock analysis*/
    Analyser a = new Analyser();
    return a.deadlockAnalysis(model, arguments.verbose, numberOfIterations, fixpointVersion, System.out);
}
Also used : Model(org.abs_models.frontend.ast.Model) Absc(org.abs_models.Absc)

Example 2 with Absc

use of org.abs_models.Absc in project abstools by abstools.

the class ABSTestRunnerCompiler method main.

public static void main(final String... args) {
    try {
        Absc arguments = Absc.parseArgs(args);
        new ABSTestRunnerCompiler().compile(arguments);
    } catch (NotImplementedYetException e) {
        System.err.println(e.getMessage());
        System.exit(1);
    } catch (Exception e) {
        System.err.println("An error occurred during compilation:\n" + e.getMessage());
        // FIXME: switch doesn't work.
        if (Arrays.asList(args).contains("-debug")) {
            e.printStackTrace();
        }
        System.exit(1);
    }
}
Also used : NotImplementedYetException(org.abs_models.common.NotImplementedYetException) Absc(org.abs_models.Absc) NotImplementedYetException(org.abs_models.common.NotImplementedYetException)

Aggregations

Absc (org.abs_models.Absc)2 NotImplementedYetException (org.abs_models.common.NotImplementedYetException)1 Model (org.abs_models.frontend.ast.Model)1