0

I was hoping to write a Java program that could pull information from the result of the program EVA2H1(http://www.lsv.ens-cachan.fr/Software/evatrans2/) and input it into the theorem prover such as SPASS.

I've found classes that can open other programs and read from files but not necessarily work with other programs. Even hard coding it to work with specific programs would be fine. I was considering using InputStream but wouldn't be sure how to go about integrating it.

Can anyone throw any pointers?

I was originally trying to make everything work as one program by writing everything in the same language OCaml but found that complicated since I wasn't used to that so I'm trying a different approach now.

Stefan
  • 1,433
  • 1
  • 19
  • 30
camjocotem
  • 375
  • 5
  • 18
  • Looks like you're constrained here by the characteristic of output EVA2H1 can generate. Can you please analyse and write a bit more about the type of output you can generate from EVA2H1 and what problems are you facing importing it to your Java process? Is it a one-off text file or do you need to listen to the regular updates from the OCaml process? – Norbert Radyk Apr 16 '14 at 15:18

1 Answers1

0

If you are writing this to run in a shell, you can pipe the output of EVA2H1 to stdout, and then read it with Java from stdin.

You could also kick off an exteral process inside Java by using the Process and Runtime classes. This way you could supply parameters to the process, and read it's output.

aglassman
  • 2,643
  • 1
  • 17
  • 30