Giter Site home page Giter Site logo

dfa's Introduction

DFA

Firstly, start SWI Prolog.

You will see something like this on your screen: % library(win_menu) compiled into win_menu 0.00 sec, 29 clauses Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 6.2.2) Copyright (c) 1990-2012 University of Amsterdam, VU Amsterdam SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

1 ?-

Now you have entered into Prolog. Note that "| ?-" is Prolog's prompt.

Next, you need to load FA engine and the example of FA into Prolog. Do

| ?- [engine].

to load the simulator, and do

| ?- [Assign]. Note:

Your current working directory should contain the prolog files. Alternatively you can run prolog by double clicking the Assign.pl file which will automatically load the two files.
To run the DFA that detects the simple arithmetic expressions, Type,

| ?- fa.

you will get

Welcome to DFA Simulator. Please enter the input. "!" character represents the end of the input.

|: then input the string you want to be checked terminated by the "!" character to denote the end. You will get the appropriate output.

dfa's People

Contributors

tharindudr avatar sajithdilshan avatar

Watchers

James Cloos avatar  avatar

Forkers

sajithdilshan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.